客户端主机IP: 108.88.3.108
客户端网关IP:108.88.3.213
伪装目标IP: 108.88.3.213
[root@adsl ~]# more /root/iptables.sh
#/bin/sh
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
echo 1 >/proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -s 108.88.3.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -s 108.88.3.0/24 -o eth0 -j SNAT --to-source 108.88.3.213
阅读(1252) | 评论(0) | 转发(0) |