nat-address.cfg.j2 473 B

123456789101112
  1. auto nat0
  2. iface nat0 inet static
  3. address {{ nat_ipv4|ipaddr('address') }}
  4. netmask 255.255.255.255
  5. pre-up ip link add $IFACE type dummy
  6. pre-up ip link set up dev $IFACE
  7. pre-up ip rule add from {{ nat_ipv4 }} table 42
  8. pre-up ip rule add to {{ nat_ipv4 }} table 42
  9. post-down ip rule del from {{ nat_ipv4 }} table 42
  10. post-down ip rule del to {{ nat_ipv4 }} table 42
  11. post-down ip link set down dev $IFACE
  12. post-down ip link del dev $IFACE