目录 1、查看防火墙当前状态 2、启动防火墙服务 3、关闭防火墙服务 4、开放指定端口 5、移除指定端口,需重启防火墙服务才能生效 6、重启防火墙 7、设置防火
以下情况对应的linux系统版本为Centos7,若使用的环境为CentOS6请使用service iptables state/start/stop/restart替换对应的systemctl status /start/stop/restart firewalld.service命令;
方法1
[root@hu ~]# firewall-cmd --state
not running ---未运行
[root@hu ~]# firewall-cmd --state
running ---运行中
方法2
[root@hu ~]# systemctl status firewalld.service
正常运行中
--结束END--
本文标题: CentOS7防火墙和端口相关命令介绍
本文链接: https://www.lsjlt.com/news/21548.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0