Centos7/RHEL7 FirewallD -- the least you need to know
This post is just a simple hints-tips to get something going with FirewallD without going into too much detail.
- Checking if you are using firewalld:
- firewall-cmd --state
- Check your zones (needed later when opening ports):
- firewall-cmd --get-default-zone
- firewall-cmd --get-active-zones
- Checking what is active:
- firewall-cmd --zone=public --list-all
- Opening services:
- firewall-cmd --zone=public --add-service=http Or alternatively:
- firewall-cmd --permanent --zone=public --add-service=http
- firewall-cmd --reload Services are defined in /usr/lib/firewalld/services and /etc/firewalld/services.
- Opening ports:
- firewall-cmd --permanent --zone=public --add-port=443/tcp
- firewall-cmd --reload