准备工作:
操作系统:Ubuntu 22.04
项目地址:https://github.com/myxuchangbin/dnsmasq_sniproxy_install
登陆服务器以后,检测是否解锁奈飞:(确保端口未被占用:53/80/443)
bash <(curl -L -s media.ispvps.com)
解锁机设置:
下载脚本
wget --no-check-certificate -O dnsmasq_sniproxy.sh https://raw.githubusercontent.com/myxuchangbin/dnsmasq_sniproxy_install/master/dnsmasq_sniproxy.sh
执行安装脚本
bash dnsmasq_sniproxy.sh -f
关闭本地DNS服务
systemctl stop systemd-resolved && systemctl disable systemd-resolved && rm -rf /etc/resolv.conf && echo 'nameserver 8.8.8.8'>/etc/resolv.conf
如果IPV6没解锁的话可以考虑关闭IPV6
echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6
节点服务器设置:
关闭本地DNS服务
systemctl stop systemd-resolved && systemctl disable systemd-resolved
设置DNS服务器(把其中127.0.0.1改成你解锁机的IP地址)
rm -rf /etc/resolv.conf && echo 'nameserver 127.0.0.1'>/etc/resolv.conf
默认优先ipv6,不需要可直接禁用ipv6
echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6