文章详情页
CentOS7防火墙和端口相关命令介绍
浏览:93日期:2023-03-07 14:40:08
目录
- 1、查看防火墙当前状态
- 2、启动防火墙服务
- 3、关闭防火墙服务
- 4、开放指定端口
- 5、移除指定端口,需重启防火墙服务才能生效
- 6、重启防火墙
- 7、设置防火墙开机自启动
- 总结
以下情况对应的linux系统版本为CentOS7,若使用的环境为CentOS6请使用service iptables state/start/stop/restart替换对应的systemctl status /start/stop/restart firewalld.service命令;
1、查看防火墙当前状态
方法1
[root@hu ~]# firewall-cmd --state not running ---未运行 [root@hu ~]# firewall-cmd --state running ---运行中
方法2
[root@hu ~]# systemctl status firewalld.service
正常运行中
相关文章:
1. 详解ngx_cache_purge _proxy_cache指令使用2. vsftpd的530 Login incorrect错误解决方法 vsftpd登录错误3. Linux服务器离线安装 nginx的详细步骤4. Windows server 2003卸载和安装IIS的图文教程5. zabbix v3.0安装部署全过程详解6. win11下FTP服务器搭建图文教程7. Windows Server 2008 R2 IIS7.5配置FTP图文教程8. Kubernetes中Nginx服务启动失败排查流程分析(Error: ImagePullBackOff)9. windows服务器安装nacos服务的过程10. nginx搭建高可用集群的实现方法
排行榜
