网站首页 > 技术教程 正文
1:常规命令
systemctl start firewalld #启动
systemctl stop firewalld #停止
systemctl status firewalld #查看状态
systemctl disable firewalld #开机禁用
systemctl enable firewalld #开机启动
2:开放端口命令
#开放80/tcp端口 (--permanent永久生效,没有此参数重启后失效)
firewall-cmd --zone=public --add-port=80/tcp --permanent
#查看80/tcp端口
firewall-cmd --zone=public --query-port=80/tcp
#关闭80/tcp端口
firewall-cmd --zone=public --remove-port=80/tcp --permanent
#批量开放端口,打开从40000到45000之间的所有端口
firewall-cmd --zone=public --add-port=40000-45000/tcp --permanent
#查看系统所有开放的端口
firewall-cmd --zone=public --list-ports
#批量关闭端口,关闭从40000到45000之间的所有端口
firewall-cmd --zone=public --remove-port=40000-45000/tcp --permanent
3:更新防火墙
firewall-cmd --reload #更新防火墙的设置,使上面的修改生效
猜你喜欢
- 2025-06-23 Linux 操作系统不需要防病毒软件和防火墙的几个原因
- 2025-06-23 Linux防火墙——iptables原理介绍
- 2025-06-23 防火墙/路由器Linux发行版Devil-Linux
- 2025-06-23 五问 Linux 网络防火墙(四):nftables 的高效框架与数据结构
- 2025-06-23 linux防火墙过滤技术iptables的原理及操作命令详解
- 2025-06-23 Linux,操作系统,防火墙,Netfilter,命令及操作
- 2025-06-23 LINUX IPTABLES 防火墙配置(linux防火墙怎么配置)
- 2025-06-23 Linux安全之网络防火墙(linux防火墙在哪)
- 2025-06-23 linux系统相关防火墙iptables命令操作
- 2025-06-23 linux 防火墙基本命令(linux防火墙主要功能)
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)
本文暂时没有评论,来添加一个吧(●'◡'●)