Running ISC's bind can be liberating, allowing you to do interesting things, but it can also be frustrating. I don't know that this is actually an issue with Bind, or with DNS in general. But definitely, you can see the issues with bind. The two most common weird issues I have run into relate to IPv6 and eDNS. Well and primarily IPv6 and eDNS in networks not fully prepared for either (shame on me).
For IPv6 issues, really the simple answer is to turn off IPv6 on your name server. Debian's more recent versions of bind allow for the addition of a '-4' command line flag, most easily facilitated by editing /etc/default/bind9 to add that commandline option. You can also turn off IPv6 on the machine in question. Or *gasp* get yourself fully on IPv6.
If the problem isn't that you are resolving IPv6 addresses that are going no where, the next likely culprit is eDNS. eDNS and it's ilk cause larger than normal DNS response packets. Large enough that some routers, firewalls, NAT devices, etc. don't know how to handle those packets and DNS resolution breaks. If you have effective logging you will see messages like "success resolving 'www.facebook.com/A' (in 'facebook.com'?) after reducing the advertised EDNS UDP packet size to 512 octets"
To test where eDNS is going amiss, you can use the following commands:
dig +norec +dnssec example.com @a.root-servers.net
dig +dnssec +norec +ignore dnskey se @A.NS.se
The first tests if eDNS packets larger than 512 bytes work, while the second tests if everything can handle IP fragmentation. If the first fails, you need to disable edns. If the first succeeds and the second fails, you need to limit the edns packet size to prevent fragmentation. The bind option edns-udp-size can help with both:
edns-udp-size 512; or
Friday, March 8, 2013
It can be very useful to have a cheat sheet of information about a command or system you don't often use. I have created my own cheat sheets for things like mdadm, exim, sendmail, etc. But today on LifeHacker, a general Linux Cheat Sheet was covered. The person who wrote it, did a great job, it is meant to be saved in your home dir and viewed via either Emacs or Vi. Of course, you can just use more/less and it works just as well. So onto the brilliance: