Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Looking for help with firewalld configuration for restricting access to an IP
Running CentOS 7
I’d like to make sure I understand the zones correctly and how this all functions.
My case is via firewalld to allow only a specific IP ssh access but allow the http https to go through normally
the default zone is public, so if I remove ssh access from there and all other zones, then on one zone allowing the ssh service and add the rich rules for my IP would that be the ideal setup for that and other services that I want to allow only from my IP?
Or do I have to specify the service in the rich-rule?
Also the How To Set Up a Firewall Using FirewallD on CentOS 7 tutorial referenced interfaces and I’m not seeing the eth0 eth1 as interfaces on any of the zones. (if I do remove a service from the default zone though, that access is removed) so I don’t think this is a problem and just something to note.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×