1
22.1 Legacy Series / [SOLVED] Unbound not responding?
« on: July 08, 2022, 11:42:21 am »
tl;dr: Unbound doesn't appear to be responding properly to DNS queries, though DNSmasq does. I suspect it's related to my multi-WAN setup, but I haven't been able to figure out where.
I'm running OPNsense 22.1.10; I was seeing the same behavior under 22.1.9.
Unbound won't respond to queries via dig; I get the same result using the shell on the OPNsense box itself or via a remote client:
The background is a little confusing, but since the problem seemed to start when I plugged in my main WAN connection, I'll try to explain as clearly as I can.
I have three Internet connections available: Cable (with a static IP) for the primary, Starlink (in bridge mode) for secondary, and cellular is third. I'm setting up this system to replace a pfSense box, so I was trying to configure everything (or at least as much as possible) under OPNsense before moving my main home Internet connection to it.
So, initially, I put Starlink on the main WAN connection (using DHCP), and the cellular modem on WAN2 (also using DHCP), and then proceeded to set up WAN failover following https://docs.opnsense.org/manual/multiwan.html#wan-failover. This appeared to work--I didn't actually test the failover functionality, but I had Internet access through the router, and no apparent problems with Unbound.
But realizing that my main Internet connection didn't use DHCP, I disconnected the cellular modem, moved Starlink to WAN2, and configured WAN for my static IP, leaving WAN disconnected. This required reconfiguration of the gateway list, since there wasn't a WAN_DHCP gateway any more. This also appeared to work; Internet access continued to be available, and Unbound continued to respond to queries as normal.
Yesterday afternoon, thinking I had everything preconfigured that I was going to be able to, I plugged my cable modem into WAN, and LAN into my switch. And at that point, Unbound stopped working. When I turned it off and turned on DNSmasq, it worked (and continues to work) just fine, and Internet access works well, but with Unbound enabled it no longer seems to be able to resolve DNS queries.
I've tried checking log files, but I don't see anything logged anywhere that's associated with the failing queries. Where else should I be looking?
I'm running OPNsense 22.1.10; I was seeing the same behavior under 22.1.9.
Unbound won't respond to queries via dig; I get the same result using the shell on the OPNsense box itself or via a remote client:
Code: [Select]
root@opnsense:~ # dig @localhost google.com
; <<>> DiG 9.18.4 <<>> @localhost google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 2147
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com. IN A
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(localhost) (UDP)
;; WHEN: Fri Jul 08 04:33:05 EDT 2022
;; MSG SIZE rcvd: 39
Code: [Select]
✘ dan@Dan-Mac-Mini-2 ~ dig @192.168.1.1 google.com
; <<>> DiG 9.10.6 <<>> @192.168.1.1 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 3653
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com. IN A
;; Query time: 1 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri Jul 08 04:32:37 EDT 2022
;; MSG SIZE rcvd: 39
But when I do a DNS lookup through the web UI (Interfaces/Diagnostics/DNS Lookup), I do get a result.The background is a little confusing, but since the problem seemed to start when I plugged in my main WAN connection, I'll try to explain as clearly as I can.
I have three Internet connections available: Cable (with a static IP) for the primary, Starlink (in bridge mode) for secondary, and cellular is third. I'm setting up this system to replace a pfSense box, so I was trying to configure everything (or at least as much as possible) under OPNsense before moving my main home Internet connection to it.
So, initially, I put Starlink on the main WAN connection (using DHCP), and the cellular modem on WAN2 (also using DHCP), and then proceeded to set up WAN failover following https://docs.opnsense.org/manual/multiwan.html#wan-failover. This appeared to work--I didn't actually test the failover functionality, but I had Internet access through the router, and no apparent problems with Unbound.
But realizing that my main Internet connection didn't use DHCP, I disconnected the cellular modem, moved Starlink to WAN2, and configured WAN for my static IP, leaving WAN disconnected. This required reconfiguration of the gateway list, since there wasn't a WAN_DHCP gateway any more. This also appeared to work; Internet access continued to be available, and Unbound continued to respond to queries as normal.
Yesterday afternoon, thinking I had everything preconfigured that I was going to be able to, I plugged my cable modem into WAN, and LAN into my switch. And at that point, Unbound stopped working. When I turned it off and turned on DNSmasq, it worked (and continues to work) just fine, and Internet access works well, but with Unbound enabled it no longer seems to be able to resolve DNS queries.
I've tried checking log files, but I don't see anything logged anywhere that's associated with the failing queries. Where else should I be looking?