# {{ansible_managed}} -- {{type}} test flush ruleset table ip stateless-nat { # DNAT chain prerouting { type filter hook prerouting priority mangle; # translate inbound destination address and port (stateless) iif eth0 tcp dport 2201 ip daddr set 10.1.1.1 tcp dport set 22 iif eth0 tcp dport 2203 ip daddr set 10.1.1.3 tcp dport set 22 } # SNAT chain postrouting { type filter hook postrouting priority mangle; # translate outbound source address (stateless) # handle multiple dnat hosts and/or ports on the way back #oif eth0 ip saddr 10.1.1.0/24 ip saddr set 192.168.122.102 oif eth0 ip saddr 10.1.1.1/32 ip saddr set 192.168.122.102 tcp sport set 2201 oif eth0 ip saddr 10.1.1.3/32 ip saddr set 192.168.122.102 tcp sport set 2203 } }