Hi everyone,
I'm facing difficulties with resolving domain names using local-unbound inside a jail on FreeBSD. Here's the situation:
Here are the configurations from pf.conf for NAT and DNS traffic:
I have checked the Unbound and /etc/resolv.conf configurations, as well as the network permissions of the jail, but the problem persists. Any guidance or tips on how to solve this issue would be greatly appreciated.
Thanks in advance for the help!
I'm facing difficulties with resolving domain names using local-unbound inside a jail on FreeBSD. Here's the situation:
- Inside the jail, when I try to resolve domain names, I get the following error:
sh:/root@[21:53] # ping -4 freebsd.org ping: cannot resolve freebsd.org: Host name lookup failure
- However, I have connectivity and my DNS server is responding correctly:
sh:/root@[21:54] # drill facebook A @10.0.0.1 ;; ->>HEADER<<- opcode: QUERY, rcode: NXDOMAIN, id: 6199 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;; facebook. IN A ;; ANSWER SECTION: ;; AUTHORITY SECTION: . 2870 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2024121101 1800 900 604800 86400 ;; ADDITIONAL SECTION: ;; Query time: 405 msec ;; SERVER: 10.0.0.1 ;; WHEN: Wed Dec 11 21:54:52 2024 ;; MSG SIZE rcvd: 101
- Additional tests show that other domain names are being resolved correctly outside the jail:
sh:/root@[21:55] # host facebook.com facebook.com has address 31.13.90.35 facebook.com has IPv6 address 2a03:2880:f17c:81:face:b00c:0:25de facebook.com mail is handled by 10 smtpin.vvv.facebook.com.
Here are the configurations from pf.conf for NAT and DNS traffic:
sh:
# NAT for outgoing traffic from jails
nat on $ext_if from $jail_if:network to any -> ($ext_if) round-robin
# Allow DNS traffic from jails to the host
pass in on $jail_if proto { tcp udp } from $jail_if:network to 10.0.0.1 port domain keep state
# Allow DNS over TLS from jails to the host
pass in on $jail_if proto tcp from $jail_if:network to 10.0.0.1 port domain-s keep state
I have checked the Unbound and /etc/resolv.conf configurations, as well as the network permissions of the jail, but the problem persists. Any guidance or tips on how to solve this issue would be greatly appreciated.
Thanks in advance for the help!