脚本支持系统:CentOS 6+, Debian8+, Ubuntu16+
CentOS6/7 ,Debian8+, Ubuntu16+ 测试成功
第一步检测是否支持netflix解锁

bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)

第二步:在能IP能看Netflix的机器上安装:

wget --no-check-certificate -O dnsmasq_sniproxy.sh https://github.com/myxuchangbin/dnsmasq_sniproxy_install/raw/master/dnsmasq_sniproxy.sh && bash dnsmasq_sniproxy.sh -i

第三步:在不能上Netflix的服务器上修改DNS

vi /etc/resolv.conf

点击键盘上insert进入输入模式
修改DNS为能看Netflix的机器的IP
例如:nameserver xxx.xxx.xxx.xxx
然后按ESC,退出编辑模式,之后同时按住shift按键和;符号输入:wq,回车保存并退出
运行service network restart或service networking restart(debian用)重启网络
本人遇坑
问题一:nameserver修改重启网络后,dns又恢复原来的
解决方法:修改网络接口配置文件,在/etc /sysconfig/network-scripts/ifcfg-eth0里面最后加上dns的设置。要不然,重启后,肯定使用eth0设置中没有设 dns的相关信息,使/etc/resolv.conf恢复到原来的状态

vi /etc/sysconfig/network-scripts/ifcfg-eth0(centos)
vi /etc/network/interface(debian)
修改
DNS1=xxx.xxx.xxx.xxx 
DNS2=xxx.xxx.xxx.xxx

然后按ESC,退出编辑模式,之后同时按住shift按键和;符号输入:wq,回车保存并退出
运行service network restart(centos)或service networking restart(debian)重启网络,我在测试时还不能观看,直接reboot重启机器后可以观看

卸载方法:

wget --no-check-certificate -O dnsmasq_sniproxy.sh https://github.com/myxuchangbin/dnsmasq_sniproxy_install/raw/master/dnsmasq_sniproxy.sh && bash dnsmasq_sniproxy.sh -u

安装遇到的问题解决:systemd-resolve占用53端口的解决方法

在Linux系统中有些软件(如:Dnsmasq解锁Netflix中的Dns等服务)可能要用到53的端口,但有些系统提示已使用(required port 53 already in use )。使用“netstat -tlunp|grep 53”查看53端口是不是systemd-resolved占用了。如果是,下面为解决方法:

1、先停用 systemd-resolved 服务

systemctl stop systemd-resolved

2、编辑 /etc/systemd/resolved.conf 文件

vi /etc/systemd/resolved.conf

3、换下面说明更改,然后按一下“esc”键,再输入“:wq”(不要输入引号),回车保存即可。

[Resolve]
DNS=8.8.8.8  #取消注释,增加dns
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
DNSStubListener=no  #取消注释,把yes改为no

4、最后运行下面命令即可。

ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
Last modification:December 29, 2021
If you think my article is useful to you, please feel free to appreciate