Closed hughgr closed 6 years ago
贴出ip route
和iptable-save
的输出。你贴的命令显示的信息不全,iptables只显示了nat表的内容。
贴出tinyfecvpn server端的log。
另外在client上为什么还要做ip route add 128.0.0.0/1 via 10.222.2.1 dev tun100这一步?
ip route add 0.0.0.0/1 via 10.222.2.1 dev tun100
ip route add 128.0.0.0/1 via 10.222.2.1 dev tun100
这两个规则是一组,分别负责一半的地址空间。
iptables -t nat -A POSTROUTING -s 10.222.0.0/16 -j SNAT --to-source IP(如果服务器是单内网网卡,IP地址不要写外网IP,而是内网网卡IP)
@threekidney 非常感谢三腰子兄 这样就说的通了 之前SNAT过去直接写的外网ip 难怪ip包出去的时候是能出去,回来的时候应该直接就被丢掉了
@wangyu- mangle,filter,raw表没什么具体的内容 所以就没贴了
ip route add 0.0.0.0/1 via 10.222.2.1 dev tun100
我理解这句话就直接把所有流量通过tun100转发了啊?
注意0.0.0.0/1
不是0.0.0.0/0
首先非常感谢作者的无私分享
描述:
使用
已经去掉限制,重新编译过的
tinyFevVPN建立链接后,仅能ping通过server,不能访问其他页面.步骤:
server
route -n
iptables -t nat -L
client(已经清空iptables的虚拟机,本来准备搞好以后做为windows的网关)
route -n
iptables -t nat -L
问题
应该说是按照文档一步步来的,不知道哪里出了问题,另外在client上为什么还要做ip route add 128.0.0.0/1 via 10.222.2.1 dev tun100这一步?
使用是GCP的机器,入站规则啥的全都允许了
求大神解答