查看Linux防火墙状态
环境:VMware、CentOS8
从centos7开始使用systemctl.firewalld来管理服务和程序,包括了service和chkconfig。
防火墙状态:systemctl status firewalld.service
Active: inactive (dead)/active(running)
关闭firewall:systemctl stop firewalld.service
重启:systemctl restart firewalld.service
启动:systemctl start firewalld.service
禁止firewall开机启动:systemctl disable firewalld.service
设置开机启用:systemctl enable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service;echo
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看已经开放的端口:firewall-cmd --list-ports
开启端口:firewall-cmd --zone=public --add-port=80/tcp --permanent
命令含义:
–zone #作用域
–add-port=80/tcp #添加端口,格式为:端口/通讯协议
–permanent #永久生效,没有此参数重启后失效
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?