首页 > 代码库 > iptables转发

iptables转发

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to-source 172.16.1.1

echo 1 > /proc/sys/net/ipv4/ip_forward  永久:vi /etc/sysctl.conf  修改: net.ipv4.ip_forward = 1 然后 sysctl -p /etc/sysctl.conf 

iptables转发