infrastructure/ansible/roles/network/templates/nomad-interface.j2

9 lines
378 B
Text
Raw Normal View History

2019-06-01 14:02:49 +00:00
auto nomad1
iface nomad1 inet manual
pre-up /sbin/ip link add nomad1 type dummy
up /sbin/ip addr add {{ public_ip }} dev nomad1
up /sbin/iptables -t nat -A PREROUTING -d {{ private_ip }}/32 -j NETMAP --to {{ public_ip }}/32
down /sbin/iptables -t nat -D PREROUTING -d {{ private_ip }}/32 -j NETMAP --to {{ public_ip }}/32
post-down /sbin/ip link del nomad1