Kylin系统防火墙(firewalld)常用命令
firewall-cmd --permanent --remove-port=3303/tcp 关闭一个端口。firewall-cmd --permanent --add-port=3303/tcp 开放一个端口。firewall-cmd --query-port=3306/tcp查看指定端口开放情况。firewall-cmd --list-all 查看全部已开放端口。systemctl disa
1.查看firewalld状态
systemctl status firewalld
systemctl status firewalld.service
systemctl is-active firewalld
2.firewalld服务
开启:systemctl start firewalld
关闭:systemctl stop firewalld
重启:systemctl restart firewalld
3.开机自启
systemctl enable firewalld 自启动
systemctl disable firewalld 自关闭
systemctl is-enabled firewalld 查询是否自启动
4.端口操作
firewall-cmd --list-all 查看全部已开放端口
firewall-cmd --query-port=3306/tcp 查看指定端口开放情况
firewall-cmd --permanent --add-port=3303/tcp 开放一个端口
firewall-cmd --permanent --remove-port=3303/tcp 关闭一个端口
firewall-cmd --reload 刷新服务启用修改
更多推荐
所有评论(0)