|
悬赏5恩山币未解决
本帖最后由 luyawolf 于 2022-8-8 19:43 编辑
lede下安装了openclash+openv_p_n。
添加了设置 :192.168.1.1是我lede的ip
route 192.168.1.0 255.255.255.0
comp-lzo adaptive
redirect-gateway def1 bypass-dhcp
dhcp-option DNS 192.168.1.1
防火墙设置:
iptables -t nat -I POSTROUTING -s 10.8.0.0/24 -j MASQUERADE
iptables -I FORWARD -i virtual**s+ -s 10.8.0.0/24 -j ACCEPT
iptables -I INPUT -i virtual**s+ -s 10.8.0.0/24 -j ACCEPT
iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
iptables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
[ -n "$(command -v ip6tables)" ] && ip6tables -t nat -A PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
后面 4行是lede默认的。前三行看教程添加的。
这样设置可以在异地访问家中局域网10.10.10.X段网络,可以上Google等一些国外网站。但是不能连接国内网站。
如果不启用openclash 只能访问局域网10.10.10.X段网络,不能访问 国外+国内网站。
openclash 设为全局也不行。
请问 如何能够访问 局域网+国内+国外?
|
|