Hey everyone! I'm trying to set up firewalld on my VPS to simplify my firewall management, but every time I try to reload it, I lose access and have to manually set up my iptables rules again just to get back in. I currently have the public zone enabled, but I'm wondering what specific things I need to activate—like source addresses or zones? Is there a sample configuration with standard open ports that I can easily apply? Any advice would be greatly appreciated!
1 Answer
When you enable firewalld, remember that it uses nftables by default. To grant SSH access, you'll want to run `firewall-cmd --permanent --zone=public --add-service=ssh`, then `firewall-cmd --reload` to apply the changes. Make sure firewalld is actually running and enabled on your system!
Good point! I thought sshd was the right term. Is it really just ssh that I need to use?
I tried that, but even with those commands, I still can't access my port. The only solution is to set rules in iptables again.