Hello every one, I have two wan interface, both have ipv4/ipv6,
I use wan1 as my default route , and use wan2 for some other customized route.
but I've found that openwrt write both interface dns settings into same dnsmasq file, that leads some dns query answered by wan2 dns ,which is not suitable for my default route (wan1). I've already uncheck "Use DNS servers advertised by peer" option, but that only disable wan2 ipv4 dns server, wan2 ipv6 dns server still in dnsmasq file, is this expected behavior or a bug ?How can I disable wan2 ipv6 dns server(but still enable wan2 ipv6) ?
here is my /tmp/resolv.conf.auto file
# Interface wan2 ==> after uncheck Use DNS servers advertised by peer, only wan2 ipv4 server disabled
# Interface wan2_6 ==> but wan2 ipv6 dns server still preserved
# Interface wan1
# Interface wan1_6
I can write a script to strip these lines and restart dnsmasq each time wan2 connected, is there better solution ?
With this option, OpenWrt spawns a wan_6 and wan2_6 interface automatically with some failsafe settings, but non-configurable.
Change that to '1' or manual in Luci. Then you can configure the IPv6 interface of the wan and wan2 to your liking.
Thanks for the information. set wan2 ipv6 option to 1 just lose wan2 ipv6 address, do you mean I need to run dhcpv6 manually on wan2 (everytime PPPoE up)? if so , I think it makes no big differences to 'strip unwanted lines'
uci set network.wan.ipv6="auto"
uci set network.wan2.ipv6="auto"
uci set network.wan.peerdns="0"
uci set network.wan6.peerdns="0"
uci set network.wan2.peerdns="0"
uci commit network
If that doesn't help, then use ipv6=1 together with IPv6 aliases for each upstream interface and configure peerdns=0 for each alias.