时间:2021-07-01 10:21:17 帮助过:22人阅读
Main PID: 8911 (firewalld)
CGroup: /system.slice/firewalld.service
└─8911 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
7月 04 20:56:57 wode006 systemd[1]: Started firewalld - dynamic firewall d...n.
Hint: Some lines were ellipsized, use -l to show in full.
[root@wode006 sysconfig]#
// 查看 zone
[root@wode006 sysconfig]# firewall-cmd --get-active-zones
public
interfaces: enp7s0f0 enp7s0f1
[root@wode006 sysconfig]#
// 添加端口3306,并重启
[root@wode006 sysconfig]# firewall-cmd --permanent --zone=public --add-port=3306/tcp
success
[root@wode006 sysconfig]# firewall-cmd --permanent --zone=public --add-port=3306/udp
success
[root@wode006 sysconfig]# firewall-cmd --reload
success
[root@wode006 sysconfig]#
// 测试
【MySQL】配置防火墙,允许外部访问
标签:mysql centos7.1 firewall