blob: 68b914ea4a7450896907f38c56db8e1ea8b3ba91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
- 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"
|