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
6dd02b72
Commit
6dd02b72
authored
1 year ago
by
Karl Grube
Browse files
Options
Downloads
Patches
Plain Diff
added support for nat servers
parent
eab94344
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/frr_conf.j2
+8
-1
8 additions, 1 deletion
templates/frr_conf.j2
with
8 additions
and
1 deletion
templates/frr_conf.j2
+
8
−
1
View file @
6dd02b72
...
@@ -55,7 +55,7 @@ router bgp {{bgp_asn}}
...
@@ -55,7 +55,7 @@ router bgp {{bgp_asn}}
neighbor firewall4s prefix-list my-networks in
neighbor firewall4s prefix-list my-networks in
neighbor nat activate
neighbor nat activate
neighbor nat prefix-list all out
neighbor nat prefix-list all out
neighbor nat prefix-list
my-networks
in
neighbor nat prefix-list
nat
in
{% for neighbor in internet_connections %}
{% for neighbor in internet_connections %}
{% for ip in neighbor.peer_ips %}
{% for ip in neighbor.peer_ips %}
{% if ip|ansible.utils.ipv4 %}
{% if ip|ansible.utils.ipv4 %}
...
@@ -163,6 +163,13 @@ ip prefix-list internet seq {{(loop.index|int)*10+170}} permit any
...
@@ -163,6 +163,13 @@ ip prefix-list internet seq {{(loop.index|int)*10+170}} permit any
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
!
!
{% for range in dc4_ranges %}
ip prefix-list nat seq {{(loop.index|int)*20-10}} permit {{range}}
ip prefix-list nat seq {{(loop.index|int)*20}} permit {{range}} ge {{((range|regex_replace('.*/',''))|int)+1}}
{% if loop.last %}
ip prefix-list nat seq {{(loop.index|int)*20+10}} deny any
{% endif %}
{% endfor %}
{% for range in dc4_ranges + anycast4_ranges %}
{% for range in dc4_ranges + anycast4_ranges %}
ip prefix-list my-networks seq {{(loop.index|int)*10}} permit {{range}}
ip prefix-list my-networks seq {{(loop.index|int)*10}} permit {{range}}
{% if loop.last %}
{% if loop.last %}
...
...
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