This commit is contained in:
2024-07-06 22:10:33 +00:00
parent 4dae39b470
commit b78e8e4242
29 changed files with 128 additions and 321 deletions

18
templates/nftables.conf.j2 Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority filter;
{% for port in open_ports %}
iifname "{{ port.interface }}" {{ port.protocol }} dport {{ port.port }} accept;
{% endfor %}
}
chain forward {
type filter hook forward priority filter;
}
chain output {
type filter hook output priority filter;
}
}