Skip to content
Snippets Groups Projects
Commit e553237d authored by Vladimír Štill's avatar Vladimír Štill
Browse files

ansible: Parametrise nftables config

parent f36e3fbd
No related branches found
No related tags found
No related merge requests found
...@@ -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
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment