- name: Configure router hosts: router remote_user: root tasks: - name: IP Forwarding sysctl: name="net.ipv4.ip_forward" value="1" sysctl_set="yes" reload="yes" - name: DNAT / eth1 iptables: table="nat" chain="PREROUTING" in_interface="eth1" jump="DNAT" to_destination="192.168.26.1" - name: DNAT / eth2 iptables: table="nat" chain="PREROUTING" in_interface="eth2" jump="DNAT" to_destination="192.168.26.1" - name: SNAT iptables: table="nat" chain="POSTROUTING" out_interface="eth3" jump="SNAT" to_source="192.168.26.254"