Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
deploy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
paradise
deploy
Commits
e553237d
There was an error fetching the commit references. Please try again later.
Commit
e553237d
authored
3 years ago
by
Vladimír Štill
Browse files
Options
Downloads
Patches
Plain Diff
ansible: Parametrise nftables config
parent
f36e3fbd
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
ansible/roles/common_deb/defaults/main.yml
+4
-0
4 additions, 0 deletions
ansible/roles/common_deb/defaults/main.yml
ansible/roles/common_deb/templates/nftables.conf.j2
+10
-0
10 additions, 0 deletions
ansible/roles/common_deb/templates/nftables.conf.j2
with
14 additions
and
0 deletions
ansible/roles/common_deb/defaults/main.yml
+
4
−
0
View file @
e553237d
...
@@ -5,4 +5,8 @@ pam_use_kerberos: True
...
@@ -5,4 +5,8 @@ pam_use_kerberos: True
backports_git
:
False
backports_git
:
False
backports
:
False
backports
:
False
nftables_default_config
:
True
nftables_default_config
:
True
nftables
:
snmp
:
false
nfs
:
false
pds_local
:
false
dhcpcd
:
True
dhcpcd
:
True
This diff is collapsed.
Click to expand it.
ansible/roles/common_deb/templates/nftables.conf.j2
+
10
−
0
View file @
e553237d
...
@@ -29,10 +29,18 @@ table inet filter {
...
@@ -29,10 +29,18 @@ table inet filter {
# allow ssh, http(s)
# allow ssh, http(s)
tcp dport { ssh, http, https } accept
tcp dport { ssh, http, https } accept
{% if nftables.snmp %}
# snmp
udp dport { 161 } accept
{% endif %}
{% if nftables.nfs %}
# NFS
# NFS
tcp dport { 111, 2049, 20048, 32765, 32766, 32803, 32769 } accept
tcp dport { 111, 2049, 20048, 32765, 32766, 32803, 32769 } accept
udp dport { 111, 2049, 20048, 32765, 32766, 32803, 32769 } accept
udp dport { 111, 2049, 20048, 32765, 32766, 32803, 32769 } accept
{% endif %}
{% if nftables.pds_local %}
# local network
# local network
ip saddr 147.251.51.160-147.251.51.255 accept
ip saddr 147.251.51.160-147.251.51.255 accept
ip saddr 147.251.48.89 accept # midas (Nikola)
ip saddr 147.251.48.89 accept # midas (Nikola)
...
@@ -41,8 +49,10 @@ table inet filter {
...
@@ -41,8 +49,10 @@ table inet filter {
# Local services (ident: 113, postgres: 5432)
# Local services (ident: 113, postgres: 5432)
ip saddr 147.251.51.160-147.251.51.255 tcp dport { 113, 5432 } accept
ip saddr 147.251.51.160-147.251.51.255 tcp dport { 113, 5432 } accept
ip6 saddr 2001:718:801:233::a0-2001:718:801:233::ff tcp dport { 113, 5432 } accept
ip6 saddr 2001:718:801:233::a0-2001:718:801:233::ff tcp dport { 113, 5432 } accept
{% endif %}
{{ nft_extra | default("") }}
{{ nft_extra | default("") }}
{{ nftables.extra | default("") }}
# everything else
# everything else
ip saddr 147.251.51.1-147.251.51.159 reject # junk from other labs
ip saddr 147.251.51.1-147.251.51.159 reject # junk from other labs
...
...
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