aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/network/templates/nomad-interface.j2
blob: 74e9cd4fa53e045fc04e7126173c9c77f5ea717b (plain) (blame)
1
2
3
4
5
6
7
8
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