CentOS7
确认防火墙开启
# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2016-05-25 15:23:43 CST; 11 months 15 days ago
Main PID: 718 (firewalld)
CGroup: /system.slice/firewalld.service
└─718 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
开放3306端口
// 添加3306端口(MariaDB默认服务端口)到防火墙
# firewall-cmd --permanent --add-port=3306/tcp
success
// 使修改立刻生效
# firewall-cmd --reload
success
// 查看防火墙策略
# firewall-cmd --list-all
未完待续