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

  • Problem solved:

     

    I defined 3 IP-Range objects "Netflix Range 74,75,78" and put it in the destiantion network list. (For all ranges from 45.57.*.100 - 45.57.*.200)

    The network rule is only for my Panasonic TV and no other devices. I hope this works for you too. [H]

  • Hey Community,

    Apologies for this inconvenience, and thank you  for sharing your solution.

    For context, has anyone tried creating their Netflix exception via the v16 method IP Regex list in the same KBA?

    In the meantime, i'll follow up with our team to get the KBA updated.

    Thanks,

  • In 17.1 MR2 some new logic around cache expiry was brought into FQDN objects.  There was unconfirmed reports that this negatively impacted NetFlix, however since we had very few people complaining and could not reproduce ourselves we could not be sure.  This new cache expiry logic was disabled by default in 17.5.
     
    Therefore if you are running 17.1 MR2, MR3, or MR4 please upgrade to 17.5 to see if that resolves the problem.

    Please note that NetFlix is actually quite hard for us to test, and it does work when we use it.  Netflix has complications because different access methods (Web, Android, iOS, Roku, etc) use different mechanisms and becasue some ISP override the NetFlix server DNS entries with their own so as to point to local regional caches to reduce network load - meaning that customers in different countries have different experiences.  The majority of our paying corporate customers do not use NetFlix on their networks, though we know it is common with people using the free home license.
     
    NetFlix also...  I won't say they deliberately obscure their traffic, but they don't make it easy.  You may notice that no one complains about Hulu or other streaming services.  Only Netflix.  Because they don't play nice.
     
    Let me briefly explain the two methods listed in the KB:
     
    One method has a series of regex that include all the IP addresses owned by netflix.  This does not include IP addresses owned by ISPs where the ISP is overriding the netflix server with their own local server.
    If this method does not work, it might work better if you make sure that the DNS used by the streaming device ultimately points to 8.8.8.8 (or other non-ISP DNS server) and not to an ISP's server.
     
    The other method uses a dynamic learning method to determine the IPs by passively watching DNS traffic.  Because of this it should be more robust on whether the streaming device is going to Netflix or ISP servers.  It is easier to configure and it is more efficient (less CPU resources when watching Netflix).  However because it is dynamically learning, some people have found it more problematic.  Also, as stated there is a reported (but not fully confirmed) issue in this dynamic learning method in 17.1 MR2-MR4 that is resolved in 17.5.
     
    The KB is not wrong.  However I will have it updated to change the emphasis to there being two methods, rather than an v16 method and a v17 method.  Both methods work in 17.x.

    Anyone who:
    is running 17.5
    is using the FQDN Host method
    is having problems
    is willing to work with us to resolve it for the betterment of everyone
    (especially if you are a paying customer and therefore get paid support, but even if you are not)
    Please let us know in this thread and we will try to get someone working with you to diagnose more.
  • Thank you for the detailied answer. [:)]

     

    Yes i am running 17.5 with FQDN host method and had some problems, so i created the ranges wich worked for me. But like you mentioned it surely depends on the country you living in.

     

    When i got some problems again i will update this thread. Thank you again for your time. [Y]

     

    By the way: As a paying customer we are still using UTM. For home i'm on the XG, because i think it is the future and will replace the UTM sometime.

  • 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

Reply Children
  • 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.

  • 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.