Setting DNS on my PPPoE WAN

I've tried setting custom DNS servers in my WAN config which is a PPPoE connection but I don't think it's working. Tried OpenDNS but their status page says I'm not using. Tried using Mullvad and their status page also suggested the same.

What/where can I check?

What is the output of:
uci show network; uci show dhcp; ls -l /etc/resolv.* /tmp/resolv.*; head -n -0 /etc/resolv.* /tmp/resolv.*

Here you go- just removed my WAN password. Also, this is going through my WireGuard Server- can post a direct WAN connection one as well. Edit: Removed the details on WG connections as well

network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fdeb:2ac9:8c97::/48'
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='eth0.1'
network.lan.proto='static'
network.lan.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.lan_dev=device
network.lan_dev.name='eth0.1'
network.lan_dev.macaddr='b4:fb:e4:57:c2:12'
network.wan=interface
network.wan.ifname='eth0.2'
network.wan.proto='pppoe'
network.wan.username=
network.wan.password=
network.wan.ipv6='auto'
network.wan.peerdns='0'
network.wan.dns='208.67.222.123 208.67.220.123'
network.wan_dev=device
network.wan_dev.name='eth0.2'
network.wan_dev.macaddr='b4:fb:e4:57:c2:13'
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].ports='1 2 3 4 6t'
network.@switch_vlan[0].vid='1'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='0 6t'
network.@switch_vlan[1].vid='2'
network.@switch_vlan[2]=switch_vlan
network.@switch_vlan[2].device='switch0'
network.@switch_vlan[2].vlan='3'
network.@switch_vlan[2].vid='20'
network.@switch_vlan[2].ports='1t 6t'
network.VLAN20=interface
network.VLAN20.proto='static'
network.VLAN20.ifname='eth0.20'
network.VLAN20.ipaddr='192.168.20.1'
network.VLAN20.netmask='255.255.255.0'
network.WireGuard=interface
network.WireGuard.proto='wireguard'
network.WireGuard.private_key=
network.WireGuard.addresses=
network.@wireguard_WireGuard[0]=wireguard_WireGuard
network.@wireguard_WireGuard[0].public_key=
network.@wireguard_WireGuard[0].allowed_ips='0.0.0.0/0' '::/0'
network.@wireguard_WireGuard[0].route_allowed_ips='1'
network.@wireguard_WireGuard[0].endpoint_host=
network.@wireguard_WireGuard[0].persistent_keepalive='25'
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].nonwildcard='1'
dhcp.@dnsmasq[0].localservice='1'
dhcp.@dnsmasq[0].server='208.67.220.123'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
dhcp.VLAN20=dhcp
dhcp.VLAN20.start='100'
dhcp.VLAN20.leasetime='12h'
dhcp.VLAN20.limit='150'
dhcp.VLAN20.interface='VLAN20'
dhcp.@host[0]=host
dhcp.@host[0].name='Foyer-AP'
dhcp.@host[0].dns='1'
dhcp.@host[0].mac='B4:FB:E4:4C:7A:66'
dhcp.@host[0].ip='192.168.1.11'
dhcp.@host[1]=host
dhcp.@host[1].name='Mesh-AP'
dhcp.@host[1].dns='1'
dhcp.@host[1].mac='18:E8:29:A0:DE:4C'
dhcp.@host[1].ip='192.168.1.12'
dhcp.@host[2]=host
dhcp.@host[2].name='DrawingRoom-AP'
dhcp.@host[2].dns='1'
dhcp.@host[2].mac='B4:FB:E4:F3:71:E3'
dhcp.@host[2].ip='192.168.1.13'
dhcp.@host[3]=host
dhcp.@host[3].name='TVRoom-AP'
dhcp.@host[3].dns='1'
dhcp.@host[3].mac='B4:FB:E4:4C:7C:91'
dhcp.@host[3].ip='192.168.1.14'
dhcp.@host[4]=host
dhcp.@host[4].name='Bedroom-AP'
dhcp.@host[4].dns='1'
dhcp.@host[4].mac='FC:EC:DA:D5:27:CD'
dhcp.@host[4].ip='192.168.1.15'
dhcp.@host[5]=host
dhcp.@host[5].name='POE8'
dhcp.@host[5].dns='1'
dhcp.@host[5].mac='FC:EC:DA:7F:38:35'
dhcp.@host[5].ip='192.168.1.10'
lrwxrwxrwx    1 root     root            16 Aug 16  2018 /etc/resolv.conf -> /tmp/resolv.conf
-rw-r--r--    1 root     root            32 Jun 15 16:40 /tmp/resolv.conf
-rw-r--r--    1 root     root            68 Jun 15 16:27 /tmp/resolv.conf.auto
-rw-r--r--    1 root     root            51 Jun 15 16:27 /tmp/resolv.conf.ppp
==> /etc/resolv.conf <==
search lan
nameserver 127.0.0.1

==> /tmp/resolv.conf <==
search lan
nameserver 127.0.0.1

==> /tmp/resolv.conf.auto <==
# Interface wan
nameserver 208.67.222.123
nameserver 208.67.220.123

==> /tmp/resolv.conf.ppp <==
nameserver 213.42.20.20
nameserver 195.229.241.222

Try set this one:

uci set dhcp.@dnsmasq[0].noresolv='1'
uci commit
service dnsmasq restart

Tried that but still don't think it works. After I restart the service, I get the following:

udhcpc: started, v1.28.3
udhcpc: sending discover
udhcpc: no lease, failing
udhcpc: started, v1.28.3
udhcpc: sending discover
udhcpc: no lease, failing

Have you tried using dnsleaktest.com to see the results?

I don't see anything wrong in the config. Install tcpdump and capture the DNS packets:
tcpdump -i any -vvn udp port 53
Then try to resolve an address (from another host in the LAN or from another SSH session)
nslookup www.cisco.com
Stop the tcpdump with Ctrl-c and post here its output.

probably your provider does not allow to use custom DNS servers. specify can and is

Aargh! Much ado about nothing- the DNS setting was manually set on my Mac! Sorry for wasting the time but I did learn a few things about OpenWRT in the process so thanks to everyone that helped.

If your problem is solved, please consider marking this topic as [Solved]. (Click the pencil behind the topic...)

1 Like