EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
internet router role
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ansible-public
internet router role
Commits
eab94344
Commit
eab94344
authored
1 year ago
by
Karl Grube
Browse files
Options
Downloads
Patches
Plain Diff
nat router support
parent
03ffc807
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
defaults/main.yml
+3
-0
3 additions, 0 deletions
defaults/main.yml
templates/frr_conf.j2
+28
-3
28 additions, 3 deletions
templates/frr_conf.j2
with
31 additions
and
3 deletions
defaults/main.yml
+
3
−
0
View file @
eab94344
...
...
@@ -3,6 +3,9 @@
allow_default_ipv4
:
False
allow_default_ipv6
:
False
firewall4s
:
[]
nat_neighbors
:
[]
dc_ranges
:
[]
dc4_ranges
:
[]
...
...
This diff is collapsed.
Click to expand it.
templates/frr_conf.j2
+
28
−
3
View file @
eab94344
...
...
@@ -15,9 +15,24 @@ router bgp {{bgp_asn}}
{% endfor %}
neighbor outside peer-group
neighbor outside remote-as external
neighbor nat peer-group
neighbor nat remote-as internal
neighbor nat bfd
neighbor nat capability extended-nexthop
neighbor firewall4s peer-group
neighbor firewall4s remote-as internal
neighbor firewall4s bfd
neighbor firewall4s capability extended-nexthop
neighbor firewalls peer-group
neighbor firewalls remote-as internal
neighbor firewalls bfd
{% for neighbor in firewall4s %}
{% if (neighbor|ansible.utils.ipv6) or (neighbor|ansible.utils.ipv4) %}
neighbor {{ neighbor }} peer-group firewall4s
{% else %}
neighbor {{ neighbor }} interface peer-group firewall4s
{% endif %}
{% endfor %}
{% for neighbor in firewalls %}
{% if (neighbor|ansible.utils.ipv6) or (neighbor|ansible.utils.ipv4) %}
neighbor {{ neighbor }} peer-group firewalls
...
...
@@ -25,12 +40,22 @@ router bgp {{bgp_asn}}
neighbor {{ neighbor }} interface peer-group firewalls
{% endif %}
{% endfor %}
{% for neighbor in nat_neighbors %}
{% if (neighbor|ansible.utils.ipv6) or (neighbor|ansible.utils.ipv4) %}
neighbor {{ neighbor }} peer-group nat
{% else %}
neighbor {{ neighbor }} interface peer-group nat
{% endif %}
{% endfor %}
!
address-family ipv4 unicast
network 0.0.0.0/0
neighbor firewalls activate
neighbor firewalls prefix-list all out
neighbor firewalls prefix-list my-networks in
neighbor firewall4s activate
neighbor firewall4s prefix-list all out
neighbor firewall4s prefix-list my-networks in
neighbor nat activate
neighbor nat prefix-list all out
neighbor nat prefix-list my-networks in
{% for neighbor in internet_connections %}
{% for ip in neighbor.peer_ips %}
{% if ip|ansible.utils.ipv4 %}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment