iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE open #全局协议的nat伪装转发
iptables -t nat -A POSTROUTING -s 172.0.0.0/16 -o adsl0 -j MASQUERADE # 指定固定的IP值范围从某个拨号做转发出口
iptables -t nat -A POSTROUTING -s 192.168.18.11 -j SNAT --to-source "192.168.0.137"
iptables -t nat -A POSTROUTING -s 192.168.18.12 -j SNAT --to-source "192.168.0.133"
iptables -t nat -A POSTROUTING -s 192.168.18.13 -j SNAT --to-source "192.168.0.211"
iptables -t nat -A POSTROUTING -s 192.168.18.14 -j SNAT --to-source "192.168.0.164"
ip rule add from 192.168.18.12 table eth1
ip rule add from 192.168.18.13 table eth2
ip rule add from 192.168.18.14 table eth3
阅读全文
评论前必须登录!
立即登录 注册