diff --git a/nftables-ns1.conf b/nftables-ns1.conf index a294f41..3432051 100644 --- a/nftables-ns1.conf +++ b/nftables-ns1.conf @@ -64,7 +64,7 @@ table inet filter { iif lo tcp dport 22 tcp flags syn ip saddr != $ip-allowlist-ssh add @ip-connlimit-ssh { ip saddr ct count over 1 } reject with tcp reset iif lo tcp dport 22 tcp flags syn ip6 saddr != $ip6-allowlist-ssh add @ip6-connlimit-ssh { ip6 saddr and ffff:ffff:ffff:ffff:ffff:: ct count over 1 } reject with tcp reset iif lo tcp dport { 53, 853 } tcp flags syn add @ip-connlimit-dns { ip saddr ct count over 16 } reject with tcp reset - iif lo tcp dport { 53, 853 } tcp flags syn add @ip6-connlimit-dns { ip6 saddr ct count over 16 } reject with tcp reset + iif lo tcp dport { 53, 853 } tcp flags syn add @ip6-connlimit-dns { ip6 saddr and ffff:ffff:ffff:ffff:: ct count over 16 } reject with tcp reset iif lo accept udp dport 53 accept @@ -76,7 +76,7 @@ table inet filter { tcp dport 22 ip6 saddr and ffff:ffff:ffff:ffff:ffff:: @ip6-connlimit-ssh reject with tcp reset tcp dport 22 synproxy mss 1460 wscale 7 timestamp sack-perm tcp dport { 53, 853 } ip saddr @ip-connlimit-dns reject with tcp reset - tcp dport { 53, 853 } ip6 saddr @ip6-connlimit-dns reject with tcp reset + tcp dport { 53, 853 } ip6 saddr and ffff:ffff:ffff:ffff:: @ip6-connlimit-dns reject with tcp reset tcp dport { 53, 853 } synproxy mss 1460 wscale 7 timestamp sack-perm } diff --git a/nftables-ns2.conf b/nftables-ns2.conf index 9a08933..b068ad5 100644 --- a/nftables-ns2.conf +++ b/nftables-ns2.conf @@ -69,7 +69,7 @@ table inet filter { iif lo tcp dport 22 tcp flags syn ip saddr != $ip-allowlist-ssh add @ip-connlimit-ssh { ip saddr ct count over 1 } reject with tcp reset iif lo tcp dport 22 tcp flags syn ip6 saddr != $ip6-allowlist-ssh add @ip6-connlimit-ssh { ip6 saddr and ffff:ffff:ffff:ffff:ffff:: ct count over 1 } reject with tcp reset iif lo tcp dport { 53, 853 } tcp flags syn add @ip-connlimit-dns { ip saddr ct count over 16 } reject with tcp reset - iif lo tcp dport { 53, 853 } tcp flags syn add @ip6-connlimit-dns { ip6 saddr ct count over 16 } reject with tcp reset + iif lo tcp dport { 53, 853 } tcp flags syn add @ip6-connlimit-dns { ip6 saddr and ffff:ffff:ffff:ffff:: ct count over 16 } reject with tcp reset iif lo accept udp dport 53 accept @@ -81,7 +81,7 @@ table inet filter { tcp dport 22 ip6 saddr and ffff:ffff:ffff:ffff:ffff:: @ip6-connlimit-ssh reject with tcp reset tcp dport 22 synproxy mss 1460 wscale 7 timestamp sack-perm tcp dport { 53, 853 } ip saddr @ip-connlimit-dns reject with tcp reset - tcp dport { 53, 853 } ip6 saddr @ip6-connlimit-dns reject with tcp reset + tcp dport { 53, 853 } ip6 saddr and ffff:ffff:ffff:ffff:: @ip6-connlimit-dns reject with tcp reset tcp dport { 53, 853 } synproxy mss 1460 wscale 7 timestamp sack-perm }