After installing a new openwrt 24.10.5 device, I am hoping to set up dnsmasq as a local resolver. Most of it is working in the sense that clients on the lan obtain ipv4 addresses, ipv6 addresses and they are receiving the configuration for the openwrt box to use as name server.
On the openwrt box I want to use the local resolver too, so I set usepeerdns to 0 in both the wan and the wan6 interface and I also set
- ::1 / 127.0.0.1 as nameserver.
- a resolvfile in the location /tmp/resolv.conf.ppp which apparently is written when the dsl connection is established
However, the existing resolvfile in /tmp/resolv.conf.ppp does not contain any ipv6 upstream addresses. With usepeerdns unset in the wan6 interface, the ipv6 dns servers by my ISP are still being set in /etc/resolv.conf but with usepeerdns=0, said servers are nowhere to be found.
How do I configure the dns system for ipv6 the same way as ipv4 in the sense that the dns servers by the ISP are being communicated to dnsmasq while openwrt itself uses its local resolver?
edit: config files added. This is /etc/config/dhcp
I have redacted a domain name (example.com and example.de are actually different domains), mac addresses, many host-sections, domain sections
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option dnssec '1'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option cachesize '10000'
option logqueries '1'
option nonegcache '1'
option domain 'example.com'
list rebind_domain 'example.de'
list rebind_domain 'example.com'
option resolvfile '/tmp/resolv.conf.ppp'
option ednspacket_max '1232'
option localservice '0'
config dhcp 'kika'
option interface 'kika'
option start '50'
option limit '200'
option leasetime '1h'
option dhcpv4 'server'
option force '1'
config dhcp 'lan'
option interface 'lan'
option start '50'
option limit '200'
option leasetime '1h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
list ra_flags 'managed-config'
list ra_flags 'other-config'
option force '1'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
option piofolder '/tmp/odhcpd-piofolder'
config host
option mac 'de:ad:be:ef:aa:aa'
option name 'hostname'
option dns '1'
option ip '192.168.44.50'
option leasetime '1h'
this is /etc/config/network
config interface 'loopback'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
option device 'lo'
config globals 'globals'
option ula_prefix 'fd00:db80::/48'
option packet_steering '1'
option steering_flows '256'
config route 'k8s_clusterip'
option interface 'lan'
option target '10.43.0.0/16'
option gateway '192.168.44.50'
config route 'route_wan'
option interface 'pppoe-wan'
option target '0.0.0.0/0'
config interface 'lan'
option proto 'static'
option ipaddr '192.168.44.1'
option netmask '255.255.255.0'
option ipv6 '1'
option delegate '0'
option ip6assign '64'
option ip6hint '00'
option device 'br-lan.5'
list ip6class 'wan6'
list ip6class 'local'
config interface 'wan'
option proto 'pppoe'
option password 'XXXXXX'
option username 'DSLXXXXXXXX-o2.de'
option ipv6 '1'
option device 'wan'
option peerdns '0'
list dns '127.0.0.1'
config interface 'wan6'
option proto 'dhcpv6'
option device '@wan'
option sourcefilter '0'
option reqaddress 'try'
option reqprefix '56'
option norelease '1'
option peerdns '0'
list dns '::1'
config dsl 'dsl'
option annex 'b'
option tone 'bv'
option xfer_mode 'ptm'
option line_mode 'vdsl'
option ds_snr_offset '60'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config bridge-vlan
option device 'br-lan'
option vlan '5'
list ports 'lan1:u*'
list ports 'lan2:u*'
list ports 'lan3:u*'
list ports 'lan4:u*'
config bridge-vlan
option device 'br-lan'
option vlan '6'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:t'
list ports 'lan4:t'
config interface 'kika'
option proto 'static'
option device 'br-lan.6'
option ipaddr '192.168.15.1'
option netmask '255.255.255.0'
this is where the symptom is visible:
root@lady:~# ls -l /tmp/resolv.conf*
lrwxrwxrwx 1 root root 35 Jan 7 01:04 /tmp/resolv.conf -> /tmp/resolv.conf.d/resolv.conf.auto
-rw-r--r-- 1 root root 48 Jan 7 01:29 /tmp/resolv.conf.ppp
/tmp/resolv.conf.d:
-rw-r--r-- 1 root root 69 Jan 7 01:29 resolv.conf.auto
root@lady:~# cat /tmp/resolv.conf
# Interface wan
nameserver 127.0.0.1
# Interface wan6
nameserver ::1
root@lady:~# cat /tmp/resolv.conf.ppp
nameserver 62.109.121.2
nameserver 62.109.121.1
/tmp/resolv.conf.ppp contains ipv4 dns servers exclusively. If I remove the list dns ‘::1’ bit from the wan6 network config, then /tmp/resolv.conf contains the ipv6 dns servers by the isp in addition to the ipv4 addresses set (127.0.0.1 in this case.)