Unbound doesn't respond to other computers on the same network (newbie)

Hello everyone.

I must preface that I am new to unbound and… networking as a whole. Please bear with me.

I’m wanting to get a local DNS resolver for my home network only; I followed the docs up through “Resolver for home networks” and have reached a snag: when I attempt to query unbound from a remote computer, it seems to do nothing at all.
My configuration is as follows:

server:

  access-control: 192.168.0.0/16 allow
  auto-trust-anchor-file: /var/lib/unbound/root.key
  chroot: ""
  directory: /var/lib/unbound
  do-daemonize: no
  interface: 0.0.0.0
  interface: ::0
  ip-freebind: yes
  log-queries: yes
  log-replies: yes
  log-time-ascii: yes
  logfile: /etc/unbound/log/unbound.log
  pidfile: ""
  tls-cert-bundle: /nix/store/6jicmrdf574c4g25j1xpffa54m80z4bv-nss-cacert-3.121/etc/ssl/certs/ca-bundle.crt
  username: ""
remote-control:
  control-cert-file: /var/lib/unbound/unbound_control.pem
  control-enable: yes
  control-interface: 127.0.0.1
  control-interface: ::1
  control-key-file: /var/lib/unbound/unbound_control.key
  server-cert-file: /var/lib/unbound/unbound_server.pem
  server-key-file: /var/lib/unbound/unbound_server.key

I’m pretty sure that my local network is on 192.168/16, and the computer I’m trying to query from has a local ip of “192.168.7.147”. The computer which hosts unbound has a local ip of “192.168.7.204” (as determined by hostname --all-ip-addresses), so I try to test it, as per the documentation, with: dig gentoo.org @192.168.7.204. The output I get is as follows:

;; communications error to 192.168.7.204#53: timed out
;; communications error to 192.168.7.204#53: timed out
;; communications error to 192.168.7.204#53: timed out

; <<>> DiG 9.20.22 <<>> gentoo.org @192.168.7.204
;; global options: +cmd
;; no servers could be reached

I looked at unbound logs and it looks like it’s not even acknowledging the attempt (in other words, nothing new is logged after running the above dig command).

I’m fairly certain that I’m making some simple error somewhere but I really have no idea what it is exactly (because I’m new to this kind of stuff). Does anyone have any suggestions ?

Hi Patrick,

Not sure what is going on but I can suggest a couple of things.

  • Do you need ip-freebind? If not, remove it from the configuration to see if anything changes.
  • You can try with a higher verbosity:4 in Unbound, but since it timeouts I am not expecting to see something different.
  • You could try ping from the client to the machine running Unbound to make sure you can reach it.

Thank you for your reply. I don’t know whether I need ip-freebind, so I turned it off; no good. I did try verbosity: 4 and the only logs which show up are those related to the initialization of unbound. Pinging and remote access via ssh (to the machine running unbound) both work fine, so it’s not as though the machine is unreachable.

Is there any chance there could be something with my home network which is messing with it?

Another thing you could try is to explicitly use only interface: 192.168.7.204 to see if you get any errors for that interface.

I had tried that as well with no luck, but I did figure it out.

Turns out the firewall on my host, which came with my distro I suppose, was blocking port 53. Telling it to allow UDP connections through port 53 fixed it.

Thank you for your help nonetheless! I do appreciate it.