This repository has been archived on 2023-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
loki/ansible/etc/nftables.conf.j2

27 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-12-16 01:25:02 +01:00
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0;
# accept any localhost traffic
iif lo accept
# accept traffic originated from us
ct state established,related accept
# allow ICMP packets
# note that for IPv6 nd-neighbor-solicit, nd-router-advert, nd-neighbor-advert are needed to not break connectivity
ip6 nexthdr icmpv6 icmpv6 type { echo-request, destination-unreachable, packet-too-big, time-exceeded, parameter-problem, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert } accept
ip protocol icmp icmp type { echo-request, destination-unreachable, router-advertisement, time-exceeded, parameter-problem } accept
# activate the following line to accept common local services
2019-07-28 11:02:11 +02:00
tcp dport { 80, 443, {{ ssh_port }}, {{ gitlab_ssh_port }} } ct state new accept
2018-12-16 01:25:02 +01:00
# count and drop any other traffic
counter drop
}
}