I have a Debian Bookworm server. I can ssh into it via LAN. I have a static IP as well and I’ve set up port forwarding on port 22 which is the configured port in /etc/ssh/sshd_config. Yet, I cannot ssh to the server via the Internet, it timeouts.
I have nftables firewall, which I thought might cause the issue. The rules in /etc/nftables.conf look like:
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain inbound {
type filter hook input priority filter;
tcp dport { 22, 80, 443 } accept
}
chain forward {
type filter hook forward priority filter;
}
}
I tried to allow ports as mentioned on nftables’ website
Any help is appreciated.