iptables -t nat -A POSTROUTING -p ${Proto} --dport ${Guest_port[$i]} -d ${Guest_ipaddr} -j SNAT --to-source ${Host_ipaddr}:${Host_port[$i]//:/-
0 0 DNAT tcp -- any any anywhere s46.srv.com tcp dpt:7482 to:192.168.122.57:22
1 60 DNAT tcp -- any any anywhere s46.srv.com tcp dpt:7482 to:192.168.122.57
0 0 SNAT tcp -- any any anywhere 192.168.122.57 tcp dpt:ssh to:123.45.67.89:7482
0 0 ACCEPT tcp -- any any anywhere 192.168.122.57 state NEW tcp dpt:ssh
iptables -t nat -A POSTROUTING -p ${Proto} --dport ${Host_port[$i]} -d ${Host_ipaddr} -j SNAT --to-source ${Guest_ipaddr}:${Guest_port[$i]//:/-}
0 0 DNAT tcp -- any any anywhere s46.srv.com tcp dpt:7482 to:192.168.122.57:22
1 60 DNAT tcp -- any any anywhere s46.srv.com tcp dpt:7482 to:192.168.122.57
0 0 SNAT tcp -- any any anywhere s46.srv.com tcp dpt:7482 to:192.168.122.57:22
0 0 ACCEPT tcp -- any any anywhere 192.168.122.57 state NEW tcp dpt:ssh
# ssh -p 7482 fastdl@123.45.67.89
ssh: connect to host 123.45.67.89 port 7482: Connection refused
# iptables -vL -t nat | egrep ".57"; iptables -vL | egrep ".57"
0 0 DNAT tcp -- any any anywhere s46.srv.com tcp dpt:7482 to:192.168.122.57:22
1 60 DNAT tcp -- any any anywhere s46.srv.com tcp dpt:7482 to:192.168.122.57
0 0 ACCEPT tcp -- any any anywhere 192.168.122.57 state NEW tcp dpt:ssh
0 0 ACCEPT tcp -- any any anywhere 192.168.122.57 state NEW tcp dpt:ssh