The issue I am facing:
I have pihole running on ubuntu 20.04 in a docker container and thats not the issue. I have test bench running and am trying to work out if i can offload DNS queries to unbound running on a vm on the same hypervisor. Essentially what im testing is if i can have pihole use the unbound DNS server at another ip address in the same subnet. Unbound is running on the other VM with ubuntu 20.04 and i have configured the conf file as per here Redirecting... and i suspect this is where my issue lies. I have tested ports that are open and can see 5335 is open and listening on the unbound server but when i change my DNS to point to the pihole server and then the pihole server has my upstream DNS server as unbound it fails to navigate to web pages.
I suspect the issue is on the unbound side and am trying to understand what could be the issue. Unbound itself is running and dig pi-hole.net @127.0.0.1 -p 5335 returns an answer.
The Pi-hole Unbound guide is configuring Unbound to only listen on the local loopback interface named lo with IP 127.0.0.1.
The guide also configures unbound to listen on port 5335.
If you want the Unbound VM to listen on IP's from the other interfaces like for example eth0, first figure out the IP for this Unbound host with below:
ip -br -4 a
And configure unbound to listen on that eth0 interface IP (or whatever interface IP you want it to listen on) in /etc/unbound/unbound.conf.d/pi-hole.conf with below:
Restart:
sudo service unbound restart
Below one should show unbound listening on the changed IP:
sudo netstat -nltup | grep 'Proto\|unbound'
Test with below (replace <CHANGED_IP> with actual IP):
Thanks for the detailed response @deHakkelaar. I had to install net-tools as i forgot when i built the VM. I checked the IP address unbound is using and it is correct. When i tested with the dig it failed, so something must be up with my config somewhere
administrator@unbound:~$ dig +short chaos txt version.bind -p 5335 10...101 (Edited IP out)
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached
EDIT: you dont have to edit out/redact private IPv4 addresses.
They are common to all of us and you wont give away allot.
And please enclose the code output with the </> button before posting here ?
EDIT2: you might have omited the @ sign before the IP eg:
She is still configured to only listen on that 127.0.0.1 address.
Go ahaead and change IP on that interface line in /etc/unbound/unbound.conf.d/pi-hole.conf.
Ok you have the REFUSED status again.
If the dig worked before the interface IP change and not after, you have something else going on and I dont know what.
Whats output for below ?