Files
private-ai-platform/ansible/roles/harden/nftables/templates/vm-nftables.conf.j2
Hrankin, Aleksandr (contracted) f243f440c3 init
2026-02-19 11:34:13 +00:00

33 lines
612 B
Django/Jinja

#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0;
policy drop;
iif "lo" accept
ct state established,related accept
# SSH
tcp dport {{ ssh_port }} accept
# udp dport {{ ntp_port }} accept
# ICMP
ip protocol icmp accept
ip6 nexthdr icmpv6 accept
}
chain forward {
type filter hook forward priority 0;
policy drop;
}
chain output {
type filter hook output priority 0;
policy accept;
}
}