diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-03-05 21:54:31 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-03-05 21:54:31 +0100 |
commit | b69d8baf18683d09deec1332b1406f213bfcf6b6 (patch) | |
tree | 03d25e08fcfe585759e05200d55b2ca14fd5c264 /dan/ele-mur.yml | |
parent | elevate: ip assignment for jampo (diff) |
elevate: prepare routing without olsr
Diffstat (limited to 'dan/ele-mur.yml')
-rw-r--r-- | dan/ele-mur.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dan/ele-mur.yml b/dan/ele-mur.yml index 2dd22293..9da81b2f 100644 --- a/dan/ele-mur.yml +++ b/dan/ele-mur.yml @@ -5,3 +5,16 @@ - role: base - role: sshd - role: zsh + post_tasks: + - name: install interface config for guest vlan + copy: + content: | + auto funkfeuer0 + iface funkfeuer0 inet static + address {{ network_zones.murat_transfer.prefix | ipaddr(network_zones.murat_transfer.offsets[inventory_hostname]) | ipaddr('address/prefix') }} + up ip route add {{ network_zones.funkfeuer.prefix | ipaddr('network/prefix') }} via {{ network_zones.murat_transfer.prefix | ipaddr(network_zones.murat_transfer.offsets['ele-tub']) | ipaddr('address') }} + up iptables -t nat -A POSTROUTING -s {{ network_zones.funkfeuer.prefix | ipaddr('network/prefix') }} -o {{ ansible_default_ipv4.interface }} -j SNAT --to {{ ansible_default_ipv4.address }} + up sysctl net.ipv4.ip_forward=1 + down iptables -t nat -D POSTROUTING -s {{ network_zones.funkfeuer.prefix | ipaddr('network/prefix') }} -o {{ ansible_default_ipv4.interface }} -j SNAT --to {{ ansible_default_ipv4.address }} + down ip route del {{ network_zones.funkfeuer.prefix | ipaddr('network/prefix') }} via {{ network_zones.murat_transfer.prefix | ipaddr(network_zones.murat_transfer.offsets['ele-tub']) | ipaddr('address') }} + dest: /etc/network/interfaces.d/funkfeuer0 |