本帖最后由 chao 于 2022-3-18 13:18 编辑
Netflix 默认 IPv6 优先,这就导致如果家里的宽带支持 IPv6,Netflix就会提示not available。 简单的做法是直接关闭 IPv6 ,但这样对于只有 IPv6 公网的用户来说会很不方便。 这时可以设置 Dnsmasq 使得 Netflix 的 AAAA 解析为空。
主路由 AC86U
- cat >> /jffs/configs/dnsmasq.d/dnsmasq.conf <<EOF
- # Null AAAA response on these domains
- server=/fast.com/#
- address=/fast.com/::
- server=/netflix.com/#
- address=/netflix.com/::
- server=/netflix.net/#
- address=/netflix.net/::
- server=/nflxso.net/#
- address=/nflxso.net/::
- server=/nflxext.com/#
- address=/nflxext.com/::
- server=/nflximg.com/#
- address=/nflximg.com/::
- server=/nflximg.net/#
- address=/nflximg.net/::
- server=/nflxvideo.net/#
- address=/nflxvideo.net/::
- server=/netflixdnstest0.com/#
- address=/netflixdnstest0.com/::
- server=/netflixdnstest1.com/#
- address=/netflixdnstest1.com/::
- server=/netflixdnstest2.com/#
- address=/netflixdnstest2.com/::
- server=/netflixdnstest3.com/#
- address=/netflixdnstest3.com/::
- server=/netflixdnstest4.com/#
- address=/netflixdnstest4.com/::
- server=/netflixdnstest5.com/#
- address=/netflixdnstest5.com/::
- server=/netflixdnstest6.com/#
- address=/netflixdnstest6.com/::
- server=/netflixdnstest7.com/#
- address=/netflixdnstest7.com/::
- server=/netflixdnstest8.com/#
- address=/netflixdnstest8.com/::
- server=/netflixdnstest9.com/#
- address=/netflixdnstest9.com/::
- EOF
-
- service restart_dnsmasq
复制代码
旁路由 N1(F大OpenWrt)
- cat >> `ps -w | grep dnsmasq | grep -Eo /var/etc/dnsmasq.conf[.][a-zA-Z0-9]+` <<EOF
- # Null AAAA response on these domains
- server=/fast.com/#
- address=/fast.com/::
- server=/netflix.com/#
- address=/netflix.com/::
- server=/netflix.net/#
- address=/netflix.net/::
- server=/nflxso.net/#
- address=/nflxso.net/::
- server=/nflxext.com/#
- address=/nflxext.com/::
- server=/nflximg.com/#
- address=/nflximg.com/::
- server=/nflximg.net/#
- address=/nflximg.net/::
- server=/nflxvideo.net/#
- address=/nflxvideo.net/::
- server=/netflixdnstest0.com/#
- address=/netflixdnstest0.com/::
- server=/netflixdnstest1.com/#
- address=/netflixdnstest1.com/::
- server=/netflixdnstest2.com/#
- address=/netflixdnstest2.com/::
- server=/netflixdnstest3.com/#
- address=/netflixdnstest3.com/::
- server=/netflixdnstest4.com/#
- address=/netflixdnstest4.com/::
- server=/netflixdnstest5.com/#
- address=/netflixdnstest5.com/::
- server=/netflixdnstest6.com/#
- address=/netflixdnstest6.com/::
- server=/netflixdnstest7.com/#
- address=/netflixdnstest7.com/::
- server=/netflixdnstest8.com/#
- address=/netflixdnstest8.com/::
- server=/netflixdnstest9.com/#
- address=/netflixdnstest9.com/::
- EOF
-
- kill `ps | grep dnsmasq | grep -E dnsmasq.conf[.][a-zA-Z0-9]+ | awk ‘{print $1}’`
- # 等待几秒 dnsmasq 会自动重启
复制代码
效果 |