0

For quite some time now I'm encountering an annoying issue regarding the YouTube app while on my home network. The app frequently shows a "check your network connection" message when I open it up while the rest of the internet is working just fine. Strange thing is, it ONLY happens with the YouTube app on my Android phone and my wife's iPhone. At the same time, access through YouTube's web site works flawlessly (from both phones), same applies to accessing it from my PC or laptop and for the rest of the internet. It's really just YouTube via the app.

I posted my issue here on serverfault since I strongly believe it must've something to do with the bind9 DNS server I installed a few months ago on my Banana Pi. I basically just set it up in order to resolve the host names inside my local network comfortably. So the DNS is just set up as a forwarding DNS which forwards all host names it cannot resolve itself to Google's servers 8.8.8.8 and 8.8.4.4.

I don't have much experience in terms of networks or DNS but I know the basics. But now I have come to a point where I don't know in which direction to investigate further.

I tried setting a few options in the DNS config back and forth but to no avail. When I set up router to send 8.8.8.8 as DNS server via DHCP, the app works on my phone and everything's fine. When I change it back to sending my local DNS the app fails. Please keep in mind: ALL other web sites and even Google services keep working.

This is my bind9 config, if this is of any help:

options {
  directory "/var/cache/bind";

  // If there is a firewall between you and nameservers you want
  // to talk to, you may need to fix the firewall to allow multiple
  // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

  // If your ISP provided one or more IP addresses for stable
  // nameservers, you probably want to use them as forwarders.
  // Uncomment the following block, and insert the addresses replacing
  // the all-0's placeholder.

  forwarders {
    8.8.8.8;
    8.8.4.4;
  };
  forward first;

  //========================================================================
  // If BIND logs error messages about the root key being expired,
  // you will need to update your keys.  See https://www.isc.org/bind-keys
  //========================================================================
  dnssec-validation auto;

  auth-nxdomain no;    # conform to RFC1035
  listen-on-v6 { any; };
  query-source address * port 53;
  query-source-v6 address * port 53;

  allow-query { any; };
  allow-query-cache { any; };
  allow-recursion { any; };

  response-policy { zone "overrides"; };
  cleaning-interval 60;
};

Can anyone help my with that and give me a clue where to investigate further? Could there be some other ports involved only when using the YouTube app or some services that Google is blocking? Or is it just my DNS being configured correct for 99.999% of the web and YouTube needs some extra treatment?

Please help. Any advice is highly appreciated!

EDIT: Forgot to mention that I noticed lately that I cannot access www.googleapis.com from my smartphone either. The host name simply would not resolve in the browser (Chrome), a simple ping or nslookup fails as well. Everything is fine again on my PC or laptop. I figured this out because I use a YouTube plugin on my media center (Kodi) which also broke and complains about host or service unknown when trying to access www.googleapis.com.

Could there be some correlation? Hope this helps in narrowing down the issue.

EDIT 2: Since changing the forward option in bind from

forward first;

to

forward only;

the YouTube app is working again for a few days now without any notable break-offs so far. So I would consider the problem solved for the time being.

  • 1
    Moved this question here from serverfault, since I've read that superuser is like serverfault but for private and home environment. – Arno-Nymous Oct 2 '17 at 10:41
1

Note: Per OPs comments, using forward only rather than forward first seems to have resolved this issue.


Regarding the YouTube app, anecdotal evidence seems to suggest it can be finicky regarding connection timeouts, especially with BIND. At a guess, resolutions occasionally take longer than the (rather poor) coding of the YouTube app accounts for and it simply decides the connection is unavailable.

Personally, I would first suggest trying forwarders other than Google -- I have had bad luck with them in BIND. When I have used forwarders, I have always fallen back to either my ISP servers or other public DNS options.

If changing forwarders doesn't help, another option to consider is doing your own resolution by adding a root hints zone e.g.:

zone "." {
     type hint;
     file "named.root";
};

You would add this after your options block. With this kind of setup, you could comment out the forwarders and bypass any delay or resolution issues they might be causing.

Arguably this is potentially slower setup in some respects than a forwarding name server, but I have found it works well for my own setup (I rarely have issues with the YouTube app).

As for specific details on configuring the second option, there are should be plenty of net tutorials, but as highlights:

  • You will need to grab a copy of the named.root hints file (or some variation thereof) via ftp.internic.net.

  • You will want to set your allow-recursion entry to something like e.g. localnets.

  • You may need to do a bit of research to find the right location for named.root, as its placement can vary by distro.

  • You gave some very useful hints here, unfortunatelly it didn't quite work out for me the way you pointed it out :/ What did help was to simply set forward only;. I had it set to forward first; before. Since the change the YouTube app works again for a few days now without any break-offs so far. – Arno-Nymous Oct 10 '17 at 21:07
  • Ah, well, this is good to know. The important thing is it worked out for you. Glad things are less broken. =) – Anaksunaman Oct 10 '17 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.