No DNS in resolv.conf

Hello,

I have a 19.07 router configure as a wireless AP, just one interface (LAN) configure this way:

I configure the DNS server (the main router) manually, but there is nothing in /etc/resolv.conf:

cat /etc/resolv.conf

search lan
nameserver 127.0.0.1

I need to add a DNS server in resolv.conf manually to get a DNS service in the AP.

I am missing something?

Kind regards.

Hello again,

Every time a I add something in /etc/resolv.conf and reboot, it erase my config and put the default information:

cat /etc/resolv.conf

search lan
nameserver 127.0.0.1

No way to get a DNS service in the AP.

Regards.

From your picture:
Change your custom DNS server to 1.1.1.1 or what ever DNS server that is closest to your location.

You could add something like this into your DHCP settings to "force" the DHCP to serve specific DNS options

He is not using DHCP so that option is not available

1 Like

dnsmasq works as a DNS relay, and this means it sets things up a bit unusually. The DNS servers are saved in /tmp/resolv.conf.auto - and dnsmasp then makes DNS avaiable on the local machine (port 53). This is why /etc/resolv.conf points to local host, it says use the localhost (router) for DNS.

So question is what is happening with you. You should have something in the logs like:

Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: reading /tmp/resolv.conf.auto
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using local addresses only for domain test
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using local addresses only for domain onion
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using local addresses only for domain localhost
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using local addresses only for domain local
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using local addresses only for domain invalid
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using local addresses only for domain bind
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using local addresses only for domain lan
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using nameserver 212.159.6.9#53
Sun Jan 19 04:03:39 2020 daemon.info dnsmasq[1874]: using nameserver 212.159.6.10#53

Thanks for your reply.

Yes, I have the "/tmp/resolv.conf.auto" configured with my DNS server:

# cat /tmp/resolv.conf.auto 
# Interface lan
nameserver 192.168.0.1

But it doesn't resolve nothing:

# ping google.com
ping: bad address 'google.com'

Until I add manually my server in /etc/resolv.conf

I have no dnsmasq logs in the AP.

Regards.

Hello,

I read this article: https://openwrt.org/docs/guide-user/network/wifi/dumbap

And disabled firewall, dnsmasq and odhcpd in the list of startup scripts in System → Startup.

And works!

Kind regards.