mirror of
https://github.com/GrapheneOS/infrastructure.git
synced 2025-01-03 11:00:49 -05:00
add connection limit allowlist for mail server
This commit is contained in:
parent
dade50c832
commit
8caa777e11
@ -3,6 +3,18 @@
|
|||||||
flush ruleset
|
flush ruleset
|
||||||
|
|
||||||
table inet filter {
|
table inet filter {
|
||||||
|
define ip-allowlist-main = {
|
||||||
|
51.79.66.27, # attestation.app
|
||||||
|
51.79.52.38, # discuss.grapheneos.org
|
||||||
|
51.79.51.42, # matrix.grapheneos.org
|
||||||
|
}
|
||||||
|
|
||||||
|
define ip6-allowlist-main = {
|
||||||
|
2607:5300:205:200::7e9, # attestation.app
|
||||||
|
2607:5300:205:200::3c4, # discuss.grapheneos.org
|
||||||
|
2607:5300:205:200::26e1, # matrix.grapheneos.org
|
||||||
|
}
|
||||||
|
|
||||||
set ip-connlimit-ssh {
|
set ip-connlimit-ssh {
|
||||||
type ipv4_addr
|
type ipv4_addr
|
||||||
flags dynamic
|
flags dynamic
|
||||||
@ -78,8 +90,8 @@ table inet filter {
|
|||||||
ct mark 0x1 accept
|
ct mark 0x1 accept
|
||||||
tcp dport 22 add @ip-connlimit-ssh { ip saddr ct count over 1 } counter reject with tcp reset
|
tcp dport 22 add @ip-connlimit-ssh { ip saddr ct count over 1 } counter reject with tcp reset
|
||||||
tcp dport 22 add @ip6-connlimit-ssh { ip6 saddr and ffff:ffff:ffff:ffff:ffff:: ct count over 1 } counter reject with tcp reset
|
tcp dport 22 add @ip6-connlimit-ssh { ip6 saddr and ffff:ffff:ffff:ffff:ffff:: ct count over 1 } counter reject with tcp reset
|
||||||
tcp dport { 25, 80, 443, 465, 993 } add @ip-connlimit-main { ip saddr ct count over 32 } counter reject with tcp reset
|
tcp dport { 25, 80, 443, 465, 993 } ip saddr != $ip-allowlist-main add @ip-connlimit-main { ip saddr ct count over 32 } counter reject with tcp reset
|
||||||
tcp dport { 25, 80, 443, 465, 993 } add @ip6-connlimit-main { ip6 saddr and ffff:ffff:ffff:ffff:: ct count over 32 } counter reject with tcp reset
|
tcp dport { 25, 80, 443, 465, 993 } ip6 saddr != $ip6-allowlist-main add @ip6-connlimit-main { ip6 saddr and ffff:ffff:ffff:ffff:: ct count over 32 } counter reject with tcp reset
|
||||||
ct mark set 0x1 accept
|
ct mark set 0x1 accept
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,8 +100,8 @@ table inet filter {
|
|||||||
tcp flags != syn accept
|
tcp flags != syn accept
|
||||||
tcp dport 22 add @ip-connlimit-ssh { ip saddr ct count over 1 } counter reject with tcp reset
|
tcp dport 22 add @ip-connlimit-ssh { ip saddr ct count over 1 } counter reject with tcp reset
|
||||||
tcp dport 22 add @ip6-connlimit-ssh { ip6 saddr and ffff:ffff:ffff:ffff:ffff:: ct count over 1 } counter reject with tcp reset
|
tcp dport 22 add @ip6-connlimit-ssh { ip6 saddr and ffff:ffff:ffff:ffff:ffff:: ct count over 1 } counter reject with tcp reset
|
||||||
tcp dport { 25, 80, 443, 465, 993 } add @ip-connlimit-main { ip saddr ct count over 32 } counter reject with tcp reset
|
tcp dport { 25, 80, 443, 465, 993 } ip saddr != $ip-allowlist-main add @ip-connlimit-main { ip saddr ct count over 32 } counter reject with tcp reset
|
||||||
tcp dport { 25, 80, 443, 465, 993 } add @ip6-connlimit-main { ip6 saddr and ffff:ffff:ffff:ffff:: ct count over 32 } counter reject with tcp reset
|
tcp dport { 25, 80, 443, 465, 993 } ip6 saddr != $ip6-allowlist-main add @ip6-connlimit-main { ip6 saddr and ffff:ffff:ffff:ffff:: ct count over 32 } counter reject with tcp reset
|
||||||
ct mark set 0x1 accept
|
ct mark set 0x1 accept
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user