snat
2023-07-18 13:59:15 4 举报
snat画图
作者其他创作
大纲/内容
Kernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth010.10.22.0 192.168.3.98 255.255.255.0 UG 0 0 0 eth010.10.132.0 172.22.0.2 255.255.255.0 UG 0 0 0 br-4e55c4444d5b10.10.133.0 172.22.0.2 255.255.255.0 UG 0 0 0 br-4e55c4444d5b10.10.134.0 172.22.0.2 255.255.255.0 UG 0 0 0 br-4e55c4444d5b10.10.137.0 172.22.0.2 255.255.255.0 UG 0 0 0 br-4e55c4444d5b169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-8bcad8f7aaa3172.22.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-4e55c4444d5b172.182.57.0 0.0.0.0 255.255.255.0 U 0 0 0 docker0192.168.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0
宿主机192.168.3.98
Kernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface0.0.0.0 172.19.0.1 0.0.0.0 UG 0 0 0 eth02.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 tun010.10.22.81 0.0.0.0 255.255.255.255 UH 0 0 0 tun010.10.22.82 0.0.0.0 255.255.255.254 U 0 0 0 tun010.10.22.84 0.0.0.0 255.255.255.252 U 0 0 0 tun010.10.22.88 0.0.0.0 255.255.255.254 U 0 0 0 tun010.10.22.105 0.0.0.0 255.255.255.255 UH 0 0 0 tun010.10.22.106 0.0.0.0 255.255.255.254 U 0 0 0 tun010.10.22.108 0.0.0.0 255.255.255.254 U 0 0 0 tun010.10.22.118 0.0.0.0 255.255.255.254 U 0 0 0 tun010.10.22.122 0.0.0.0 255.255.255.255 UH 0 0 0 tun010.10.22.151 0.0.0.0 255.255.255.255 UH 0 0 0 tun010.10.22.152 0.0.0.0 255.255.255.252 U 0 0 0 tun010.10.22.211 0.0.0.0 255.255.255.255 UH 0 0 0 tun010.10.22.212 0.0.0.0 255.255.255.252 U 0 0 0 tun010.10.22.216 0.0.0.0 255.255.255.248 U 0 0 0 tun010.10.22.224 0.0.0.0 255.255.255.240 U 0 0 0 tun010.10.22.240 0.0.0.0 255.255.255.248 U 0 0 0 tun010.10.22.248 0.0.0.0 255.255.255.254 U 0 0 0 tun010.10.22.250 0.0.0.0 255.255.255.255 UH 0 0 0 tun0172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
访问10.10.22.X网段
Kernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth010.10.22.0 172.19.0.2 255.255.255.0 UG 0 0 0 br-741d72b67d94172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0172.19.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-741d72b67d94192.168.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0192.168.16.0 0.0.0.0 255.255.240.0 U 0 0 0 br-5510452dff1c
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
3.99
Docker容器里的vpn,必须加上iptables规则,删除规则就无法通信
docker-easyconnect
0 条评论
下一页