CenOS 7 firewall port systemctl action items
Centos open ports
# firewall-cmd --zone=public --add-port=3306/tcp --permanent
Centos close the port
# firewall-cmd --zone = public --remove -port = 8090 / tcp --permanent
Validate the configuration
# firewall-cmd --reload
systemctl action items (start, power, status) service name
Enabling Services systemctl start service name
out of service systemctl stop service name
check the service status systemctl status service name
service boot systemctl enable service name
to disable the service systemctl disable the service name
Directory service where the / usr / lib / systemd / system /
Centos open ports
# firewall-cmd --zone=public --add-port=3306/tcp --permanent
Centos close the port
# firewall-cmd --zone = public --remove -port = 8090 / tcp --permanent
Validate the configuration
# firewall-cmd --reload
systemctl action items (start, power, status) service name
Enabling Services systemctl start service name
out of service systemctl stop service name
check the service status systemctl status service name
service boot systemctl enable service name
to disable the service systemctl disable the service name
Directory service where the / usr / lib / systemd / system /