centos 防火墙
piaoling 2023-11-09 12:17:31
systemctl start firewalld
systemctl stop firewalld
firewall-cmd --reload 或者 systemctl restart firewalld
systemctl status firewalld
systemctl enable firewalld 允许开机启动
systemctl disable firewalld 禁止开机启动
firewall-cmd --list-ports 查看已开放的端口
firewall-cmd --query-port=202/tcp 查询指定端口是否放开
firewall-cmd --zone=public --add-port=6379/tcp --permanent 开放指定端口 需重启防火墙
firewall-cmd --zone=public --remove-port=13306/tcp --permanent 删除指定端口 需重启防火墙
systemctl stop firewalld
firewall-cmd --reload 或者 systemctl restart firewalld
systemctl status firewalld
systemctl enable firewalld 允许开机启动
systemctl disable firewalld 禁止开机启动
firewall-cmd --list-ports 查看已开放的端口
firewall-cmd --query-port=202/tcp 查询指定端口是否放开
firewall-cmd --zone=public --add-port=6379/tcp --permanent 开放指定端口 需重启防火墙
firewall-cmd --zone=public --remove-port=13306/tcp --permanent 删除指定端口 需重启防火墙
发表评论(评论将通过邮件发给作者):