exit: store VLAN interface addresses in NetBox

… instead of generating them from prefixes. A NetBox script can be
used to create and configure all necessary data for a new VLAN.

Instead of VLAN roles “inside" and “outside” we now create separate
VRFs for inside VLANs to match the actual exit/firewall configuration.
The “outside” VRF is for all VLANs that are directly accessible from
the internet.
This commit is contained in:
Timotej Lazar 2024-04-10 14:03:50 +02:00
parent ece3b8a377
commit db397cb2b1
7 changed files with 32 additions and 51 deletions

View file

@ -37,8 +37,13 @@ iface {{ iface.name }}
{% endif %}
{#- Addresses. #}
{% for addr in iface.ip_addresses %}
{% for addr in iface.ip_addresses | rejectattr('role') %}
address {{ addr.address }}
{% endfor %}
{% set anycast = iface.ip_addresses | selectattr('role') | selectattr('role.value', '==', 'anycast')
| map(attribute='address') %}
{% if anycast %}
address-virtual 00:00:5e:00:01:01 {{ anycast | ipaddr(1) | join(' ') }}
{% endif %}
{% endfor %}