From e7ed329bd81c2273c03e94c93c9ce9c1d01cdc86 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 1 Apr 2017 04:53:28 +0200 Subject: Initial import --- vm/vagrant-router/router.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 vm/vagrant-router/router.yml (limited to 'vm/vagrant-router/router.yml') diff --git a/vm/vagrant-router/router.yml b/vm/vagrant-router/router.yml new file mode 100644 index 0000000..68b914e --- /dev/null +++ b/vm/vagrant-router/router.yml @@ -0,0 +1,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" -- cgit v1.2.3