Centos 7 Firewalld command

in Centos 7 Version, there is a slight differences between version 6. There is a firewalld application, who replaced the iptables in centos 6. this is the list of firewalld command taken from github.com/awangga/zimbracentos

Check your firewall
# systemctl status firewalld
# firewall-cmd --state
# firewall-cmd --zone=public --list-all
# firewall-cmd --list-services
# cat /etc/firewalld/zones/public.xml
Open port 25 and 2053 and other services
# firewall-cmd --permanent --zone=public --add-port=25/tcp
# firewall-cmd --permanent --zone=public --add-port=25/udp
# firewall-cmd --permanent --zone=public --add-port=2053/tcp
# firewall-cmd --permanent --zone=public --add-port=465/tcp
# firewall-cmd --permanent --zone=public --add-port=587/tcp
# firewall-cmd --permanent --zone=public --add-service=http
# firewall-cmd --permanent --zone=public --add-service=https
# firewall-cmd --permanent --zone=public --add-service=smtp
# firewall-cmd --permanent --zone=public --add-service=imaps
# firewall-cmd --permanent --zone=public --add-service=pop3s
# firewall-cmd --permanent --zone=public --add-service=ldap
Reload all setting using –permanent option only
# firewall-cmd --reload
Remove port access
# firewall-cmd --permanent --zone=public –-remove-port=443/tcp
# firewall-cmd --zone=public --remove-port=80/tcp --permanent
# firewall-cmd --zone=public --remove-port=7071/tcp
Share on Google Plus

About Rolly Maulana Awangga

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment