CentOS 7.1 Version
View Firewalld
[Email protected] sysconfig]# systemctl status Firewalld
firewalld.service-firewalld-dynamic Firewall daemon
Loaded:loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active: Active (running) since six 2015-07-04 20:56:57 CST; 1min 52s ago
Main pid:8911 (FIREWALLD)
CGroup:/system.slice/firewalld.service
└─8911/usr/bin/python-es/usr/sbin/firewalld--nofork--nopid
July 20:56:57 wode006 systemd[1]: Started firewalld-dynamic firewall D...N.
Hint:some lines were ellipsized, use-l to show on full.
[Email protected] sysconfig]#
View Zone
[Email protected] sysconfig]# Firewall-cmd--get-active-zones
Public
INTERFACES:ENP7S0F0 ENP7S0F1
[Email protected] sysconfig]#
Add Port 3306 and restart
[Email protected] sysconfig]# firewall-cmd--permanent--zone=public--add-port=3306/tcp
Success
[Email protected] sysconfig]# firewall-cmd--permanent--zone=public--add-port=3306/udp
Success
[Email protected] sysconfig]# Firewall-cmd--reload
Success
[Email protected] sysconfig]#
Test
"MySQL" configuration firewall, allow external access