iptables

查看防火墙规则

1
iptables -L -n --line-number

端口转发

将192.168.171.139:5555端口的包全部转发到192.168.171.1:9999端口

1
iptables -t nat -A PREROUTING --dst 192.168.171.139 -p tcp --dport 5555 -j DNAT --to-destination 192.168.171.1:9999