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
354051d0
Commit
354051d0
authored
1 year ago
by
Karl Grube
Browse files
Options
Downloads
Patches
Plain Diff
functional trusted_peers
parent
79cd4b6b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
defaults/main.yml
+2
-0
2 additions, 0 deletions
defaults/main.yml
templates/frr_conf.j2
+18
-0
18 additions, 0 deletions
templates/frr_conf.j2
templates/int_rtr.nft.j2
+1
-1
1 addition, 1 deletion
templates/int_rtr.nft.j2
with
21 additions
and
1 deletion
defaults/main.yml
+
2
−
0
View file @
354051d0
...
@@ -8,3 +8,5 @@ dc4_ranges: []
...
@@ -8,3 +8,5 @@ dc4_ranges: []
anycast_ranges
:
[]
anycast_ranges
:
[]
anycast4_ranges
:
[]
anycast4_ranges
:
[]
trusted_peers
:
[]
This diff is collapsed.
Click to expand it.
templates/frr_conf.j2
+
18
−
0
View file @
354051d0
...
@@ -15,9 +15,22 @@ router bgp {{bgp_asn}}
...
@@ -15,9 +15,22 @@ router bgp {{bgp_asn}}
{% endfor %}
{% endfor %}
neighbor outside peer-group
neighbor outside peer-group
neighbor outside remote-as external
neighbor outside remote-as external
neighbor trusted-peers peer-group
neighbor trusted-peers remote-as internal
neighbor trusted-peers bfd
{% for neighbor in trusted_peers %}
{% if (neighbor|ansible.utils.ipv6) or (neighbor|ansible.utils.ipv4) %}
neighbor {{ neighbor }} peer-group trusted-peers
{% else %}
neighbor {{ neighbor }} interface peer-group trusted-peers
{% endif %}
{% endfor %}
!
!
address-family ipv4 unicast
address-family ipv4 unicast
network 0.0.0.0/0
network 0.0.0.0/0
neighbor trusted-peers activate
neighbor trusted-peers prefix-list all out
neighbor trusted-peers prefix-list all 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 %}
...
@@ -30,6 +43,9 @@ router bgp {{bgp_asn}}
...
@@ -30,6 +43,9 @@ router bgp {{bgp_asn}}
!
!
address-family ipv6 unicast
address-family ipv6 unicast
network ::/0
network ::/0
neighbor trusted-peers activate
neighbor trusted-peers prefix-list all out
neighbor trusted-peers prefix-list all 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.ipv6 %}
{% if ip|ansible.utils.ipv6 %}
...
@@ -128,3 +144,5 @@ ip prefix-list my-networks seq {{(loop.index|int)*10}} permit {{range}}
...
@@ -128,3 +144,5 @@ ip prefix-list my-networks seq {{(loop.index|int)*10}} permit {{range}}
ip prefix-list my-networks seq {{(loop.index|int)*10+10}} deny any
ip prefix-list my-networks seq {{(loop.index|int)*10+10}} deny any
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
ip prefix-list all seq 10 permit any
ipv6 prefix-list all seq 10 permit any
This diff is collapsed.
Click to expand it.
templates/int_rtr.nft.j2
+
1
−
1
View file @
354051d0
...
@@ -44,7 +44,7 @@ table inet filter {
...
@@ -44,7 +44,7 @@ table inet filter {
iif == lo accept
iif == lo accept
tcp dport ssh accept
tcp dport ssh accept
{% for range in dc_ranges %}
{% for range in dc_ranges %}
ip{% if range|ansible.utils.ipv6%}6{% endif %} saddr {{range}}
tcp dport ssh
accept
ip{% if range|ansible.utils.ipv6%}6{% endif %} saddr {{range}} accept
{% endfor %}
{% endfor %}
{% for neighbor in internet_connections %}
{% for neighbor in internet_connections %}
{% for ip in neighbor.peer_ips %}
{% for ip in neighbor.peer_ips %}
...
...
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