nat.conf.j2 359 B

123456789101112131415161718
  1. protocol direct nat0 {
  2. interface "nat0";
  3. }
  4. template bgp uplink {
  5. local as {{ as }};
  6. import where net ~ 0.0.0.0/0;
  7. export where net ~ {{ nat_ipv4 }};
  8. };
  9. {% if peers is defined %}
  10. {% for peer in peers %}
  11. protocol bgp '{{ peer.name }}' from uplink {
  12. neighbor {{ peer.peer_ipv4 }} as {{ peer.as }};
  13. };
  14. {% endfor %}
  15. {% endif %}