drop SSH connections to new anycast IPs

This commit is contained in:
Daniel Micay 2025-05-03 23:19:02 -04:00
parent 029882f051
commit a6d1e00d07

View file

@ -3,6 +3,9 @@
flush ruleset
table inet filter {
define ip-anycast = 185.187.152.9
define ip6-anycast = 2a05:b0c4:1::8
define ip-allowlist-ssh = {
51.161.34.158, # 0.ns1.grapheneos.org
}
@ -47,6 +50,9 @@ table inet filter {
udp dport 53 notrack accept
tcp dport 22 ip daddr $ip-anycast drop
tcp dport 22 ip6 daddr $ip6-anycast drop
# handle new TCP connections beyond rate limit via synproxy to avoid conntrack table exhaustion
tcp dport { 22, 53, 80, 443, 853 } tcp flags syn limit rate over 1024/second burst 1024 packets counter notrack accept