代码改变世界

iptables端口转发

2012-03-08 03:28  游乐场123  阅读(160)  评论(0编辑  收藏  举报

-A POSTROUTING -d 58.64.154.175 -p tcp --dport 31888 -j MASQUERADE
-A PREROUTING -p tcp --dport 31888 -j DNAT --to-destination 58.64.154.175:31888
-A POSTROUTING -d 58.64.154.175 -p tcp --dport 31800 -j MASQUERADE
-A PREROUTING -p tcp --dport 31800 -j DNAT --to-destination 58.64.154.175:31800