lede icon indicating copy to clipboard operation
lede copied to clipboard

openwrt ipv4 和 ipv6 域名解析优先级调换咨询

Open copperfieldd opened this issue 2 years ago • 3 comments

大佬好,NAS ddns需要用到ipv6公网,目前开启路由ipv6域名解析后pc和手机上外网速度受严重影响了,一个域名同时具备ipv4和ipv6默认会先解析ipv6,请问可以在路由上调换ipv6和ipv4的解析优先级吗?(需要优先解析ipv4,ipv4不能用再解析ipv6)linux下可以修改/etc/gai.conf文件实现,opwrt里面未找到相应配置 label ::1/128 0 label ::/0 1 label 2002::/16 2 label ::/96 3 label ::ffff:0:0/96 4 precedence ::1/128 50 precedence ::/0 40 precedence 2002::/16 30 precedence ::/96 20 precedence ::ffff:0:0/96 10 image

copperfieldd avatar Dec 28 '22 07:12 copperfieldd

smartdns有双栈优选,dnsmasq不会设置

hwliu11 avatar Dec 28 '22 11:12 hwliu11

vim /etc/dnsmasq.conf 增加条目并保存后,重启dnsmasq 关闭指定域名的ipv6解析,以下为举例

address=/bilibili.com/:: address=/netflix.com/::

minlang112 avatar Dec 29 '22 04:12 minlang112

安装个smartdns吧,挺好用,双栈优选,也可以屏蔽IPV6

jxph1123 avatar Dec 29 '22 08:12 jxph1123