网站首页 > 技术教程 正文
1、打开防火墙:systemctl start firewalld
2、关闭防火墙:systemctl stop firewalld
3、查看防火墙:systemctl status firewalld
4、重启防火墙:systemctl restart firewalld
5、查看开放的端口:firewall-cmd --zone=public --list-ports
6、开放特定的端口:firewall-cmd --zone=public --add-port=8888/tcp --permanent (–permanent永久生效,没有此参数重启后失效)
7、关闭端口:firewall-cmd --zone=public --remove-port=8888/tcp --permanent
8、指定ip访问固定的端口(允许127.0.0.1 访问5433端口)
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="127.0.0.1" port protocol="tcp" port="5433" accept"
9、限制IP为127.0.0.1的地址禁止访问8899端口即禁止访问机器
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="127.0.0.1" port protocol="tcp" port="8899" reject"
10、删除已设置规则
firewall-cmd --permanent --remove-rich-rule="rule family="ipv4" source address=" 127.0.0.1" port protocol="tcp" port="8888" accept"
备注:执行完命令后记得重新加载-----
重新载入一下防火墙设置,使设置生效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防火墙设置firewalld)
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- 下划线是什么 (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)
本文暂时没有评论,来添加一个吧(●'◡'●)