OPKG Fails (wget returned 4, DNS Issue)

And I hope /tmp/resolv.conf is fetched from /etc/resolv.conf

1 Like

OK, OPKG update is working again. I reapplied your dhcp file change the way you originally wanted it, then restarted the router. That was the missing piece which I did not do prior!

Many thanks to everyone who took a look and found a workable solution!

Now, what does that change correspond to in terms of the LuCi UI @egc?

And why did simply setting the lan interface's DNS server to 192.168.1.100, and then the wan interface to same, not work?

The router itself is looking for DNS at 127.0.0.1 meaning its own address where DNSMasq is running.
If you have DNSMasq disabled (which you should not do but that is another question) the router should listen on another address e.g. 192.168.x.x where the actually DNS server is running or 8.8.8.8 for a public DNS server etc.

To set this in motion you have to disable local use that is what I wrote about and then the router will use the DNS servers set on WAN/LAN
I do not think that there is a GUI setting for (not sure) as you are not supposed to disable DNSMasq :slight_smile:

So to recap the only thing you should have to do if you disabled DNSMasq and you want the router to listen on another address for DNS is set the correct DNS addres on WAN/LAN and from the command line:

uci set dhcp.@dnsmasq[0].localuse='0'
uci commit dhcp

Reboot and Bob is your uncle at least that is the theory, never tried it

1 Like

ok that makes sense to me, thanks. I wish it was clearer how to do this in LuCi, which is my preferred way of interacting with the OS, but that's a separate complaint that I myself should probably work on rectifying at some future point :smiley:

If you have the time, it does make me wonder: why should I not turn off DNSmasq? Doesn't that prevent me from being certain that I will use unbound on the other server for my DNS resolution?

if you request a domain the domain has to be converted to ip address for working with computer network. and DNS server does the job. DNS server has all the big data and the router does not. So the router has to forward DNS query to DNS server. This job is got done by dnsmasq. It just forward and reply that is it works as bridge. At your case it is forwarding to pihole.

So if you disable it you get no domain name converted to ip address.

To be sure you can disconnect the pihole temporarily and then try to update opkg or surf the internet which uses the router as dns server.

(* devices that are manually configured to use other dns server will bypass this. such as android phone with encrypted dns/DoH enabled or using vpn)

Simply point DNSMasq to the dns resolver you are using in your subnet and you can keep it enabled.

1 Like

OK, last question - where can I find out how to do that via LuCi?

On each interface you can set the DNS resolver which will be used

the thing is I did that, and that's how I got into this issue with the router itself not using the dns resolver I wanted. I had the lan bind interface set to 192.168.1.100, and I also tried the wan interface set to 192.168.1.100, both with and without the lan interface setting set. In none of these cases was the router able to resolve the DNS server... unless I needed to do a router restart? I didn't do a restart between each of these tests...