Red Hat / Centos firewall

From MyWiki
Revision as of 11:11, 19 July 2016 by George2 (Talk | contribs)

Jump to: navigation, search
Try this command
firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" \
source address="1.2.3.4/32" \
port protocol="tcp" port="4567" accept"
Check the zone file later to inspect the XML configuration
cat /etc/firewalld/zones/public.xml

firewall-cmd --state
sudo systemctl start firewalld.service
firewall-cmd --get-default-zone
firewall-cmd --get-active-zones
firewall-cmd --list-all
firewall-cmd --get-zones
firewall-cmd --zone=home --list-all