I am using a TP-Link device with OpenWRT installed. The TP-Link is not being used as a router, just as a DHCP server. The main router for this network is the AT&T Fiber gateway that they provided to me.
AT&T does not allow you to change the DNS server on the gateway, so I was hoping to use DHCP to inject the desired DNS servers to clients.
I have one of the TP-Link's LAN ports plugged into one of the AT&T LAN ports, and the AT&T gateway has DHCP turned off. The TP-Link successfully assigns IP addresses to clients.
TP-Link: 192.168.0.1
AT&T Gateway: 192.168.0.2
The DHCP server specifies that 192.168.0.2 is the default route / gateway. The internet works and traceroute
shows the first hop as 192.168.0.2, which is what I want.
What I don't want is this: Even though OpenWRT is acting as the DHCP server, it's somehow still also providing AT&T's DNS:
# Generated by resolvconf
domain lan
search lan attlocal.net
nameserver 192.168.0.1
**nameserver 2600:1700:... (etc)**
Here are my settings. peerdns
is turned off everywhere I can possibly think to do it.
root@OpenWrt:~# uci show network.lan
network.lan=interface
network.lan.device='br-lan'
network.lan.proto='static'
network.lan.ip6assign='60'
network.lan.dns='208.67.222.222' '208.67.220.220'
network.lan.ipaddr='192.168.0.1/24'
network.lan.gateway='192.168.0.2'
root@OpenWrt:~# uci show network.wan
network.wan=interface
network.wan.device='eth0.2'
network.wan.proto='dhcp'
network.wan.peerdns='0'
network.wan.dns='208.67.222.222' '208.67.220.220'
root@OpenWrt:~# uci show network.wan6
network.wan6=interface
network.wan6.device='eth0.2'
network.wan6.proto='dhcpv6'
network.wan6.reqaddress='try'
network.wan6.reqprefix='auto'
network.wan6.peerdns='0'
network.wan6.dns='2620:119:35::35' '2620:119:53::53'
root@OpenWrt:~# uci show dhcp.@dnsmasq[0]
dhcp.cfg01411c=dnsmasq
dhcp.cfg01411c.domainneeded='1'
dhcp.cfg01411c.localise_queries='1'
dhcp.cfg01411c.rebind_protection='1'
dhcp.cfg01411c.rebind_localhost='1'
dhcp.cfg01411c.local='/lan/'
dhcp.cfg01411c.domain='lan'
dhcp.cfg01411c.expandhosts='1'
dhcp.cfg01411c.dhcp_option='3,192.168.0.2' '6,192.168.0.1'
dhcp.cfg01411c.readethers='1'
dhcp.cfg01411c.leasefile='/tmp/dhcp.leases'
dhcp.cfg01411c.resolvfile='/tmp/resolv.conf.d/resolv.conf.auto'
dhcp.cfg01411c.localservice='1'
dhcp.cfg01411c.ednspacket_max='1232'
dhcp.cfg01411c.confdir='/tmp/dnsmasq.d'
dhcp.cfg01411c.authoritative='1'
root@OpenWrt:~# uci show dhcp.lan
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcp_option='6,192.168.0.1'
dhcp.lan.dhcpv4='server'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.ra_flags='managed-config' 'other-config'
dhcp.lan.force='1'
dhcp.lan.dns='2620:119:35::35' '2620:119:53::53'
root@OpenWrt:~# uci show dhcp.wan
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='0'
dhcp.wan.dhcp_option='6,192.168.0.1'
dhcp.wan.ra_flags='none'
Any help would be appreciated here. The only DNS I want the DHCP server to give to clients is 192.168.0.1. Thank you!