iptables做内网映射

iptables -t nat -A PREROUTING -d 外网IP -p tcp –dport 18090 -j DNAT –to 内网IP:8090
iptables -t nat -L -n –line-numbers
iptables -t nat -D PREROUTING 3

iptables -t nat -A PREROUTING -d 1.1.1.1 -p tcp –dport 18090 -j DNAT –to-destination 2.2.2.2:8090


iptables -t nat -A PREROUTING -d 1.1.1.1 -p tcp –dport 18090 -j DNAT –to-destination 2.2.2.2:8090