欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

OpenVPN 简介 - 重点:

最编程 2024-07-18 22:44:55
...

# 添加 SNAT 规则

# 方法 1

[root@open-server ~] echo 'iptables -t nat -A POSTROUTING -s 10.8.0.0/24 ! -d 10.8.0.0/24 -j MASQUERADE' >> /etc/rc.d/rc.local

# 方法 2

[root@open-server ~] echo 'iptables -t nat -A POSTROUTING -s 10.8.0.0/24 ! -d 10.8.0.0/24 -j SNAT --to-source 172.30.0.1' >> /etc/rc.d/rc.local

[root@open-server ~] chmod +x /etc/rc.d/rc.local

[root@open-server ~] iptables -vnL

[root@open-server ~] iptables -vnL -t nat