This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Netflix not working despite - Knowledge base is wrong?

I have followed this  https://community.sophos.com/kb/en-us/125061

and still I can't get netflix to work, why? only works when I disable web scanning in the rule number 6



This thread was automatically locked due to age.
Parents
  • What rules do you have above your netflix rule?

    Please post a full screenshot of your netflix rule, not just the top part.

    Ian

  • Here are all the IP ranges that Netflix owns.  This does not include IPs that ISPs may be using as local caches.

    https://ipinfo.io/AS2906

     

    This has carefully been converted into RegEx for the exception.  Please don't modify these regex, they are specially crafted to meet those IP ranges.

    ^23\.246\.([0-9]|[1-5][0-9]|6[0-3])\.[0-9]
    ^37\.77\.(1(8[4-9]|9[0-1]))\.[0-9]
    ^45\.57\.([0-9]|[1-9][0-9]|1([0-1][0-9]|2[0-7]))\.[0-9]
    ^64\.120\.(1(2[8-9]|[3-9][0-9])|2([0-4][0-9]|5[0-5]))\.[0-9]
    ^66\.197\.(1(2[8-9]|[3-9][0-9])|2([0-4][0-9]|5[0-5]))\.[0-9]
    ^192\.173\.(6[4-9]|[7-9][0-9]|1([0-1][0-9]|2[0-7]))\.[0-9]
    ^69\.53\.(2(2[4-9]|[3-4][0-9]|5[0-5]))\.[0-9]
    ^108\.175\.(3[2-9]|4[0-7])\.[0-9]
    ^185\.2\.(2(2[0-3]))\.[0-9]
    ^185\.9\.(1(8[8-9]|9[0-1]))\.[0-9]
    ^198\.38\.(9[6-9]|1([0-1][0-9]|2[0-7]))\.[0-9]
    ^198\.45\.(4[8-9]|5[0-9]|6[0-3])\.[0-9]
    ^208\.75\.(7[6-9])\.[0-9]

     

    In order to get Netflix working for you, you added the IP range "45.57.74.100-200" which is in those subset.  Someone adventurous could try to convert all the ranges into FQDN hosts.  Or if want to use the ranges, it is easier to just use the RegEx exception.

     

    Can you go into the XG Device Console (not an ssh command line) and tell me the results of

    show fqdn-host

     

  • Hi Michael,

    thank you for the detailed investigation. I just tried a n NSLOOKUP from my mac in Australia and was returned a range of addresses which I have checked a couple and they are on Amazon US. Might be of interest?

     

    Non-authoritative answer:

    Name: netflix.com

    Address: 54.69.239.253

    Name: netflix.com

    Address: 34.213.151.116

    Name: netflix.com

    Address: 52.42.235.31

    Name: netflix.com

    Address: 35.160.112.124

    Name: netflix.com

    Address: 54.70.73.70

    Name: netflix.com

    Address: 52.42.228.237

    Name: netflix.com

    Address: 54.71.111.34

    Name: netflix.com

    Address: 52.32.190.151

    Regards

    Ian

  • We are not going to be mapping out all countries/ISPs content delivery servers.  :)

     

    If anyone is curious about Netflix inner structures:

    https://blog.apnic.net/2018/06/20/netflix-content-distribution-through-open-connect/

    https://www.theregister.co.uk/2016/06/22/boffins_map_netflixs_open_connect_cdn/

  • I understand what you are saying, but without the local addresses netflix will not function? They are not Australian sites, they are US sites. The data costs for any Australian ISP/RSP netflix provider would be horrenderous.

    My XG uses local RSP DNS servers.

    Ian

  • Thank you again, good work. [H]

     

    Here is my result from "show fqdn-host":

    cache-ttl:                 dns-reply-ttl

    idle-timeout:            default

    learn-subdomains:    enable

    IP eviction:              disable

  • Thanks Balmasque,

     

    The settings look correct.  Off the top of my head I don't know the next thing to look at.

    I'm on vacation until the new year, and will look at this again then - if you are willing to help investigate.

  • OK, i wish you a nice vacation. Next year i can help to investigate. [Y]

  • Hi TheBalmasque
     
    Can you let me know what device you are connecting through?  eg roku TV, ipad.
     
    Can we confirm that your configuration is correct when using the FQDN Host method?  You should have a high-level rule that has a destination network of Netflix.  Can you please provide a screenshot of the list of firewall rules and the full details of the netflix rule.
     
    Attempt to use Netflix (ideally quit Netflix, start NetFlix, log in, attempt to play a video)
    Go to Hosts and Services, FQDN host.  Set a name filter for "*.n".  You should see several netflix objects.  Hover over the FQDN, it should say something like "3 subdomains, 24 IP address".  You should be able to click in to see full list.  I don't need the details (yet) but let us at least make sure that it is collecting IPs.
     
    Under the log viewer, Web filter, can you see the blocked netflix traffic?  Can you see the destination IP as part of the URL?
     
    Can you find that IP/URL in any of the FQDN host objects?
     
  • Can you let me know what device you are connecting through? 

     

    Its only a Panasonic TV accessing netflix in my network. (TX-55CXW804)

     

    Can we confirm that your configuration is correct when using the FQDN Host method?  You should have a high-level rule that has a destination network of Netflix.  Can you please provide a screenshot of the list of firewall rules and the full details of the netflix rule.

     

    The netlix rule is my first rule. See screenshot below:

     

    Here are the details about the rule:

     

     

     

    When i hover over the FQDN sometimes i got a list shown, other times it says: "No Subdomains found." Strange behaviour...

     

    I hope i can help you with that. [H]

  • TheBalmasque said:

    When i hover over the FQDN sometimes i got a list shown, other times it says: "No Subdomains found." Strange behaviour...

     

    Can you please explain or describe it more detail?  I feel like we are narrowing in here on the issue.

Reply Children
  • Hi there.

    Sorry, i try to reproduce this but it seems i was seeing it wrong. Sometimes the response is a little bit slow, so i think i saw "No Subdomains found". But it was the other entry. For me *.netlix.com always displays 11 subdomains and 96 IP adresses. And *.nflxso.net 3 subdomains 12 IP adresses.

     

    The other entrys like *.nfxvideo.net, *.nflxext.com and *.nflximg.net displays "No Subdomains found". Is this normal?

  • I've been doing a little more investigation with my Sony TV, and an Apple TV device.

    Firstly, the specific issue with Web scanning and Netflix video playback revolves around malware scanning. Netflix video streaming happens over HTTP. It makes extensive use of byte range requests via the Range: HTTP header. These are not compatible with HTTP malware scanning. XG does try to automatically make exceptions to this when we know it's streaming media traffic, but unfortunately Netflix traffic is very hard to distinguish from regular traffic. This is made harder because the Smart TV Netflix video streaming app uses IP addresses in the URL instead of a hostname, and provides no other HTTP headers to go on.

    If malware scanning is disabled, Netflix works fine.

    We can't disable malware scanning for all traffic of course. One way to do this for Netflix traffic alone by specifying traffic in a firewall rule, using FQDN objects to try and pick up any IP addresses associated with the various Netflix domains, and disabling HTTP scanning. But as you've found, it doesn't always work.

    For FQDN objects to work, there has to be a DNS lookup for the corresponding domain that returns the IP address. I spent some time capturing traffic between my TV and my XG firewall today, and found that much of the time, there were NO DNS responses corresponding to the IP addresses that Netflix used to get video content. In some cases, those IPs were already recorded against the FQDN object on my XG, but I can only assume that's because some other Netflix client (a web browser, maybe, or a mobile app) accessed the content in a different way.

    So I think the reason why you're finding it doesn't always work, is that the TV must be getting the IP addresses provided directly from other Netflix transactions and not DNS. If you watch the traffic generated by the Netflix app, there is also a lot of HTTPS traffic that is presumably powering the menu system and controlling access to the content.

    What I did notice was that URLs used to access the video playback were pretty consistent in format. They look like this:

    hxxp://205.250.87.205/?o=AQHs5r9i3IqU22PaiJ-aVneFNYYH-WKkoC1KT1kYinKL88Ok1GAa0D3_OSHJCzPOHuGeZVqwcqPn2HYXvcBG33-nXwabGNfsBtIy-eO2T6_ks6exhLKmM2SHC37MCbMxvqQ9JlZUPK5yEkc3AxCdUy9El4-L7DwIgV9i4kOVsr88H9boYWCsCijkjSFqrY71nVHJfsuKug_96k-kIFuXF94&v=3&e=1547017850&t=nqVlvSUm-FIT_altCqugFB6hyb0

    Another way to skip malware scanning is to use a Web Exception. Web exceptions can use regular expressions to match URLs. When I created an exception that excludes scanning for the following regular expression, I was able to watch Netflix videos again, regardless of whether the IP address was known or not:

    ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/\?o=[a-zA-Z0-9_-]*&v=[0-9]*&e=[0-9]*

    This expression matches any URL with four 1-3 digit numbers in the hostname part, and also matches the first three parameters in the URL.

    Perhaps this will help in your case?

     

  • Rich (my boss) beat me to it with the reply.  And he has more test toys when he works from home - though he cannot reproduce the problem.  :)
    While his RegEx may provide another solution (which I want to investigate), it doesn't explain why the current solution does not work.

    Test 1:
    On the XG command line, run the following:
    service -ds nosync fqdnd:restart
    This will restart the service collecting IPs and will clear the list of known IPs.
    Take a look at the FQDN objects.  It should be "no subdomains found"
    Power off (eg unplug) your TV.
    Note: It is important to fully force the TV (or set top box, or whatever is doing netflix) to clear its cache with a complete shutdown.
    Power on your TV.
    Start Netflix.  Watch a show.
    Take a look at the FQDN objects.  It should have a bunch of IPs.
    Are there now IPs for nfxvideo.net ?
    Just in case the full power-off actually fixed the problem, turn off the exception and test with just the Netflix destination.
    Any better?
    Make sure you are not doing any netflix on any other device during this test.

    Test 2:
    Can you set up the following:
    FW rule 1 : Source: TV  Destination: Netflix  Web: None
    FW rule 2 : Source: TV  Destination: Any  Web: None
    FW rule 3 : Source: LAN  Destination: WAN  Web: Whatever your normal is
    Now watch some videos on Netflix.
    If you go to the Firewall list of rules you will see In and Out bytes.  Confirm that Rule 2 has traffic that is hitting it.
    This will prove that there is a traffic that is not being caught by Rule 1.

    Edit Rule 2.  Set Web Policy to Allow All.  This will cause the web traffic to go through the web proxy, but not AV, so it should work and give you web logging.
    Now watch some videos on Netflix.
    Go to Log Viewer, Detailed View (icon), Web Filter.  If you need to, you can use filter or search to narrow to the ip address of your TV.
    You should be getting a bunch of URLs that look like IP addresses.
    Are you getting anything that is not an IP address?
    Can you post a few lines from the log here?
    Take the IP address and go back to the FQDN host objects.  Is the IP listed anywhere in any of the host object?
    If the IP is not listed, that means the there is a problem in the capturing of IPs.
    If the IP is listed, that means the there is a problem in the destination rule matching.
     
  • @ : Thank you very much for your investigation. I didn`t know the FQDN objects are "learing" new ip adresses when an other device access Netfilx, very interesing. [H]

    @Michael Dunn: Hello, sorry i dont understand the following phrase: On the XG command line, run the following.  

    What command should i run to to restart the IP collection service?

     

    Tomorrow i will try to follow your steps. Thank you very much in advance. [H]

  • Sorry, must have forgotten to paste in the command.  I edited the above post. 

    service -ds nosync fqdnd:restart

     

    This is a service that watches all DNS requests, learning new IP addresses on an FQDN and putting it into a memory cache.  This is cleared if you restart the service.  This will watch all DNS requests, so if your TV, your phone, and your computer all do DNS requests to Netflix, it learns them all.  In testing this, in order to be pure, try to only do one device at a time.  This service does not know anything about DNS requests that occur before it started.  Therefore if you start Netflix on your TV, which does DNS requests, then reboot your XG, the XG will not know about any of the DNS that the TV did.  In THEORY the TV should be using the TTL (time to live) to re-do the DNS requests periodically, so that over time the XG learns all the IPs, even ones that are from before it booted.  One GUESS is that the TV is doing DNS requests and caching the results a really long time so that the XG never learns them.  That is why I want a full power cycle of the TV, to try to force it to do the DNS requests while the XG is monitoring.

  • Thank you for the command line. It worked for me. All adresses are gone and now they are collecting again.

    Under *.nflxvideo.net now there is 1 IP adress:

    ipv4-c008-fra002-ix.1.oca.nflxvideo.net 45.57.74.137

     

    I started with Test 1:

    With my range exceptions it worked. All videos go through without any errors. When i turn of my exeptions the videos didnt start anymore with an error message from netflix.

    Here are some logs:

     

    There are some IP-adresses from my range exception like 45.57.78.132. This ip-adress is not coverd by the netflix fqdn-objects.

     

    Test 2:

    As you see there is a lot traffic in FW 2.

    When i go to the logs i see the following:

     

    There are several hits for the firewall ID3 which is my http-scanning rule. I dont see the FW 2 logs even there is traffic encountered.

  • I am having the same problem connecting to Netflix from Roku devices. 

    If I add the Sophos XG v16 web exceptions, it works fine. The second I turn them off, to test the v17 fix...it kills Netflix (only my Roku devices).

  • I think the main problem is, that there are some IP-addresses (like 45.57.78.132) not associated with the netflix fqdn-objects.

    But i'm excited to hear some new infos from the Sophos team. [H]

  • The problem does seem to be on the collection of IP addresses into FQDN objects.  I'm trying to get an expert in this area to take a deeper look.