摘要: 我们有一台计算机,有两块网卡,eth0连外网,ip为1.2.3.4;eth1连内网,ip为192.168.0.1.现在需要把发往地址1.2.3.4的81端口的ip包转发到ip地址192.168.0.2的8180端口,设置如下:1. iptables -t nat -A PREROUTING -d 1.2.3.4 -p tcp -m tcp --dport 81 -j DNAT --to-destination192.168.0.2:81802. iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.0.0 -d192.168.0.2 -p 阅读全文
posted @ 2013-04-15 15:39 奋斗的小菜鸟 阅读(279) 评论(0) 推荐(0) 编辑