Update: I originally thought the problem was with unbound, but it seems to only have manifested itself there. Original post follows, but I believe the real issue is due to pf. See the second post for info.
I'm having a strange problem with unbound 1.4.14 on FreeBSD 9.0-RELEASE for i386. Previously, I was running a unbound (I forget the exact version, but it was just minor version or two before 1.4.14 prior to upgrading FBSD) and nsd setup in separate jails on 8.2 on the same machine without issues. After upgrading to 9.0 and recompiling all ports (portmaster -af), and updating all the files in the jail, unbound has ceased to function correctly.
Before I get too deep, let me explain my setup. The machine in question is a gateway for a home network, and has two interfaces (in reality, it has four, but the other two are irrelevant here): vlan2, which is the services network where unbound resides, and fxp0, which is the WAN interface. Bear in mind that unbound is being run on the same machine doing routing and not on a different machine on the same vlan. One of the many IP addresses on the vlan2 interface on the router is assigned to the jail for unbound, which is 192.168.1.220, and nsd is running (and working) as my authoritative/slave non-recursive server on 192.168.1.219. Unbound has no issues querying the stub zones hosted on the nsd server. However, when trying to query anything else (i.e. public domains), unbound is unable to resolve anything. NAT is done on fxp0 by pf, and appears to be working without any issues.
Here's a quick diagram for anyone who's a more visual thinker:
So, why can't unbound query internet DNS servers? Well, I'm not entirely sure. If I try to look up a public DN (e.g. http://www.google.com), I see lots of queries for the root domain name servers sent out (thanks to tcpdump). It does numerous queries for all the root servers, and even though these queries are answered in a timely manner, it appears that unbound ignores the replies. I even updated my named.cache to the latest version, which is:
...but this made no difference--it still hammers the root servers for some unknown reason. I've checked both pf states and the log files, and from what I can tell, both appear to validate that it is receiving the reply packets that I'm seeing in tcpdump. I also tried running it outside the jail, and removing anything but the bare necessities (like stub zones), and rebuilding the config from the sample, and the same problem occurs. I've also checked the config with unbound-checkconf, and it finds no errors. What changed so drastically between 8.2 and 9.0 that might cause this?
I've attached one of my more stripped-down configurations for unbound, along with a very verbose log file of a single query for http://www.google.com via dig (eventually returning SERVFAIL after more than 30 seconds). Any idea on where to go from here would be greatly appreciated.
Edit: If you need more info, such as packet traces, just ask.
I'm having a strange problem with unbound 1.4.14 on FreeBSD 9.0-RELEASE for i386. Previously, I was running a unbound (I forget the exact version, but it was just minor version or two before 1.4.14 prior to upgrading FBSD) and nsd setup in separate jails on 8.2 on the same machine without issues. After upgrading to 9.0 and recompiling all ports (portmaster -af), and updating all the files in the jail, unbound has ceased to function correctly.
Before I get too deep, let me explain my setup. The machine in question is a gateway for a home network, and has two interfaces (in reality, it has four, but the other two are irrelevant here): vlan2, which is the services network where unbound resides, and fxp0, which is the WAN interface. Bear in mind that unbound is being run on the same machine doing routing and not on a different machine on the same vlan. One of the many IP addresses on the vlan2 interface on the router is assigned to the jail for unbound, which is 192.168.1.220, and nsd is running (and working) as my authoritative/slave non-recursive server on 192.168.1.219. Unbound has no issues querying the stub zones hosted on the nsd server. However, when trying to query anything else (i.e. public domains), unbound is unable to resolve anything. NAT is done on fxp0 by pf, and appears to be working without any issues.
Here's a quick diagram for anyone who's a more visual thinker:
Code:
----------- router -----------
| |
| unbound (.220) |
| | |
VLAN2 hosts <========= vlan2 fxp0 ==(NAT'ed via pf)==> Internet
| | |
| nsd (.219) |
| |
------------------------------
So, why can't unbound query internet DNS servers? Well, I'm not entirely sure. If I try to look up a public DN (e.g. http://www.google.com), I see lots of queries for the root domain name servers sent out (thanks to tcpdump). It does numerous queries for all the root servers, and even though these queries are answered in a timely manner, it appears that unbound ignores the replies. I even updated my named.cache to the latest version, which is:
Code:
; last update: Jun 8, 2011
; related version of root zone: 2011060800
I've attached one of my more stripped-down configurations for unbound, along with a very verbose log file of a single query for http://www.google.com via dig (eventually returning SERVFAIL after more than 30 seconds). Any idea on where to go from here would be greatly appreciated.
Edit: If you need more info, such as packet traces, just ask.