@KillVirus
i tried everything but it seems that its yust not working in my setup…..
this is the output of nft list ruleset
`root@mail:/opt/mailcow-dockerized# sudo nft list ruleset
table ip nat {
chain POSTROUTING {
type nat hook postrouting priority srcnat; policy accept;
oifname != “br-mailcow” ip saddr 172.22.1.0/24 counter packets 74 bytes 5222 masquerade
oifname != “docker0” ip saddr 172.17.0.0/16 counter packets 0 bytes 0 masquerade
oifname != “br-01f569c9d095” ip saddr 172.18.0.0/16 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.249 ip daddr 172.22.1.249 tcp dport 6379 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.3 ip daddr 172.22.1.3 tcp dport 8983 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.9 ip daddr 172.22.1.9 tcp dport 3306 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.11 ip daddr 172.22.1.11 tcp dport 443 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.11 ip daddr 172.22.1.11 tcp dport 80 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.250 ip daddr 172.22.1.250 tcp dport 12345 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.250 ip daddr 172.22.1.250 tcp dport 4190 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.250 ip daddr 172.22.1.250 tcp dport 995 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.250 ip daddr 172.22.1.250 tcp dport 993 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.250 ip daddr 172.22.1.250 tcp dport 143 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.250 ip daddr 172.22.1.250 tcp dport 110 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.253 ip daddr 172.22.1.253 tcp dport 587 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.253 ip daddr 172.22.1.253 tcp dport 465 counter packets 0 bytes 0 masquerade
meta l4proto tcp ip saddr 172.22.1.253 ip daddr 172.22.1.253 tcp dport 25 counter packets 0 bytes 0 masquerade
}
chain PREROUTING {
type nat hook prerouting priority dstnat; policy accept;
fib daddr type local counter packets 247 bytes 14868 jump DOCKER
}
chain OUTPUT {
type nat hook output priority -100; policy accept;
ip daddr != 127.0.0.0/8 fib daddr type local counter packets 0 bytes 0 jump DOCKER
}
chain DOCKER {
iifname "br-mailcow" counter packets 0 bytes 0 return
iifname "docker0" counter packets 0 bytes 0 return
iifname "br-01f569c9d095" counter packets 0 bytes 0 return
iifname != "br-mailcow" meta l4proto tcp ip daddr 127.0.0.1 tcp dport 7654 counter packets 0 bytes 0 dnat to 172.22.1.249:6379
iifname != "br-mailcow" meta l4proto tcp ip daddr 127.0.0.1 tcp dport 18983 counter packets 0 bytes 0 dnat to 172.22.1.3:8983
iifname != "br-mailcow" meta l4proto tcp ip daddr 127.0.0.1 tcp dport 13306 counter packets 0 bytes 0 dnat to 172.22.1.9:3306
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 443 counter packets 227 bytes 13620 dnat to 172.22.1.11:443
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 80 counter packets 0 bytes 0 dnat to 172.22.1.11:80
iifname != "br-mailcow" meta l4proto tcp ip daddr 127.0.0.1 tcp dport 19991 counter packets 0 bytes 0 dnat to 172.22.1.250:12345
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 4190 counter packets 0 bytes 0 dnat to 172.22.1.250:4190
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 995 counter packets 0 bytes 0 dnat to 172.22.1.250:995
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 993 counter packets 0 bytes 0 dnat to 172.22.1.250:993
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 143 counter packets 0 bytes 0 dnat to 172.22.1.250:143
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 110 counter packets 0 bytes 0 dnat to 172.22.1.250:110
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 587 counter packets 0 bytes 0 dnat to 172.22.1.253:587
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 465 counter packets 0 bytes 0 dnat to 172.22.1.253:465
iifname != "br-mailcow" meta l4proto tcp ip daddr 192.168.2.8 tcp dport 25 counter packets 0 bytes 0 dnat to 172.22.1.253:25
}
}
table ip filter {
chain DOCKER {
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.249 tcp dport 6379 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.3 tcp dport 8983 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.9 tcp dport 3306 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.11 tcp dport 443 counter packets 227 bytes 13620 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.11 tcp dport 80 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.250 tcp dport 12345 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.250 tcp dport 4190 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.250 tcp dport 995 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.250 tcp dport 993 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.250 tcp dport 143 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.250 tcp dport 110 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.253 tcp dport 587 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.253 tcp dport 465 counter packets 0 bytes 0 accept
iifname != “br-mailcow” oifname “br-mailcow” meta l4proto tcp ip daddr 172.22.1.253 tcp dport 25 counter packets 0 bytes 0 accept
}
chain DOCKER-ISOLATION-STAGE-1 {
iifname "br-mailcow" oifname != "br-mailcow" counter packets 4705 bytes 17341525 jump DOCKER-ISOLATION-STAGE-2
iifname "docker0" oifname != "docker0" counter packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-2
iifname "br-01f569c9d095" oifname != "br-01f569c9d095" counter packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-2
counter packets 63132 bytes 302175167 return
}
chain FORWARD {
type filter hook forward priority filter; policy drop;
counter packets 63132 bytes 302175167 jump DOCKER-USER
counter packets 63132 bytes 302175167 jump DOCKER-ISOLATION-STAGE-1
oifname "br-mailcow" ct state related,established counter packets 56180 bytes 284691934 accept
oifname "br-mailcow" counter packets 2247 bytes 141708 jump DOCKER
iifname "br-mailcow" oifname != "br-mailcow" counter packets 4705 bytes 17341525 accept
iifname "br-mailcow" oifname "br-mailcow" counter packets 2013 bytes 127716 accept
oifname "docker0" ct state related,established counter packets 0 bytes 0 accept
oifname "docker0" counter packets 0 bytes 0 jump DOCKER
iifname "docker0" oifname != "docker0" counter packets 0 bytes 0 accept
iifname "docker0" oifname "docker0" counter packets 0 bytes 0 accept
oifname "br-01f569c9d095" ct state related,established counter packets 0 bytes 0 accept
oifname "br-01f569c9d095" counter packets 0 bytes 0 jump DOCKER
iifname "br-01f569c9d095" oifname != "br-01f569c9d095" counter packets 0 bytes 0 accept
iifname "br-01f569c9d095" oifname "br-01f569c9d095" counter packets 0 bytes 0 accept
}
chain DOCKER-USER {
counter packets 119263 bytes 571386023 return
}
chain DOCKER-ISOLATION-STAGE-2 {
oifname "br-mailcow" counter packets 0 bytes 0 drop
oifname "docker0" counter packets 0 bytes 0 drop
oifname "br-01f569c9d095" counter packets 0 bytes 0 drop
counter packets 4705 bytes 17341525 return
}
}
table ip6 nat {
chain POSTROUTING {
type nat hook postrouting priority srcnat; policy accept;
oifname != “docker0” ip6 saddr fd00:dead:beef:c0::/80 counter packets 0 bytes 0 masquerade
}
chain PREROUTING {
type nat hook prerouting priority dstnat; policy accept;
fib daddr type local counter packets 0 bytes 0 jump DOCKER
}
chain OUTPUT {
type nat hook output priority -100; policy accept;
ip6 daddr != ::1 fib daddr type local counter packets 0 bytes 0 jump DOCKER
}
chain DOCKER {
iifname "docker0" counter packets 0 bytes 0 return
}
}
table ip6 filter {
chain DOCKER {
}
chain DOCKER-ISOLATION-STAGE-1 {
iifname "br-mailcow" oifname != "br-mailcow" counter packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-2
iifname "docker0" oifname != "docker0" counter packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-2
iifname "br-01f569c9d095" oifname != "br-01f569c9d095" counter packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-2
counter packets 0 bytes 0 return
}
chain FORWARD {
type filter hook forward priority filter; policy drop;
counter packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-1
oifname "docker0" ct state related,established counter packets 0 bytes 0 accept
oifname "docker0" counter packets 0 bytes 0 jump DOCKER
iifname "docker0" oifname != "docker0" counter packets 0 bytes 0 accept
iifname "docker0" oifname "docker0" counter packets 0 bytes 0 accept
}
chain DOCKER-ISOLATION-STAGE-2 {
oifname "br-mailcow" counter packets 0 bytes 0 drop
oifname "docker0" counter packets 0 bytes 0 drop
oifname "br-01f569c9d095" counter packets 0 bytes 0 drop
counter packets 0 bytes 0 return
}
}
`