firewall防火墙配置使用手册

1、查看端口开发情况
firewall-cmd --list-all

2、允许特定IP访问指定端口
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="127.0.0.1" port protocol="tcp" port="27017" accept'

3、删除指定规则

firewall-cmd --list-all

 firewall-cmd --permanent --remove-rich-rule ''将要删除的规则复制到''中,注意空格,如下:

firewall-cmd --permanent --remove-rich-rule "rule family="ipv4" source address="127.0.0.1" port port="27017" protocol="tcp" accept"

4、开发端口号

firewall-cmd --zone=public --add-port=80/tcp --permanent   # 开放80端口  
firewall-cmd --zone=public --remove-port=80/tcp --permanent  #关闭80端口 

5、重新刷新【每次操作完成都需要reload才会生效】
firewall-cmd --reload

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
华为防火墙配置命令主要包括以下几个方面: 一、基本设置命令: 1. 设置系统主机名:sysname [hostname] 2. 配置管理接口地址:interface ethernet [interface-id] ip address [ip-address] [subnet-mask] 3. 配置域名服务器地址:ip host source-ip [ip-address] 二、安全策略命令: 1. 创建安全区域:security-zone [name] 2. 创建安全策略:security-policy [policy-name] from [source-zone] to [destination-zone] source [source-address] destination [destination-address] service [service-name] action [allow|deny] 三、网络地址转换命令: 1. 配置动态地址转换:nat address-group mapping-rule [name] protocol [tcp|udp] dynamic known-ratio [ratio] to interface [interface-id] 2. 配置静态地址转换:nat address-group mapping-rule [name] protocol [tcp|udp] static [global-ip-address] inside [inside-ip-address] 四、日志命令: 1. 配置日志服务器:log server ip [ip-address] port [port] 2. 配置日志策略:log policy [policy-name] action [permit|deny] destination [log-server-name] source [source-address] service [service-name] 五、系统管理命令: 1. 保存配置:save 2. 加载配置:load 3. 显示系统配置信息:display firewall configuration 以上介绍了部分华为防火墙配置命令,仅供参考。具体的配置要根据实际情况和需要进行调整。建议在进行防火墙配置前先了解设备操作手册和相关技术文档,以便更准确地配置和管理华为防火墙

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值