华为防火墙的基本配置

1-防火墙设备管理方式

一、console

user-interface con 0
authentication-mode password
set authentication password cipher 密码
idle-timeout 0 0

二、web

interface GigabitEthernet0/0/0
ip binding vpn-instance default
ip address 192.168.0.1 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit

三、telnet

1.定义用户名
aaa
manager-user 用户名
password cipher 密码
service-type telnet
level 15

2.进入VTY
user-interface vty 0 4
authentication-mode aaa
protocol inbound telnet

3.将telnet服务开启
telnet server enable

4.互联接口下开启telnet服务
interface GigabitEthernet0/0/0
ip binding vpn-instance default
ip address 192.168.0.1 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage telnet permit

四、SSH

1.生成密钥对
rsa local-key-pair create

2.本地开启Stelnet服务
stelnet server enable

3.定义用户名密码
aaa
manager-user 用户名
password cipher 密码
service-type ssh
level 15

4.进入VTY
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh

5.互联接口下开启stelnet服务
interface GigabitEthernet0/0/0
ip binding vpn-instance default
ip address 192.168.0.1 255.255.255.0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage telnet permit
service-manage ssh permit

6.用户的关联
ssh user 用户
ssh user 用户 authentication-type password
ssh user 用户 service-type stelnet

2-防火墙安全域基本概念

1.创建安全域,将接口加入进安全域
firewall zone name 名字
set priority 10
add interface GigabitEthernet1/0/0

2.安全策略中定义规则

security-policy
rule name trust_untrust
source-zone trust
destination-zone untrust
source-address 100.1.1.0 mask 255.255.255.0
destination-address 200.1.1.0 mask 255.255.255.0
service icmp
action permit

3.查看会话表信息

display firewall session table //查看会话表信息
display firewall session table verbose //查看会话表详细信息
display firewall session table verbose protocol icmp //查看icmp协议形成的会话表的详细信息

4.查看安全策略
display security-policy rule all

3-防火墙NAT配置

[接口加入进安全域以及基础配置略]

1.静态路由

ip route-static 0.0.0.0 0.0.0.0 +下一跳地址

2.定义安全策略 [注意要和接下来的NAT-策略对应起来]
security-policy
rule name trust_untrust
source-zone trust
destination-zone untrust
source-address 100.1.1.0 mask 255.255.255.0
service icmp
action permit

3.定义NAT地址池
nat address-group 名字
mode pat //模式定义为Pat
section 0 100.1.1.1 100.1.1.1 //定义地址池范围

4.定义NAT策略
nat-policy
rule name 名字
source-zone trust
destination-zone untrust
source-address 100.1.1.0 mask 255.255.255.0
service icmp
action source-nat address-group 名字 //关联地址池名字

nat-policy
rule name easy_ip
source-zone trust
destination-zone untrust
source-address 100.1.1.0 mask 255.255.255.0
service icmp
action source-nat easy-ip

4-防火墙NAT服务器映射配置

[基本配置略]
1.定义NAT-映射

nat server 0 zone untrust protocol tcp global 1.1.1.1 www inside 1.1.2.1 www no-reverse //定义nat映射 并且不生成反向的server-map

2.定义安全策略

security-policy
rule name nat_server
source-zone trust
destination-zone dmz //定义nat映射后的即可
source-address 192.168.1.0 mask 255.255.255.0
action permit

5-防火墙双机热备配置

[基本的配置-略]

一、定义vrrp

[FW_1]
interface GigabitEthernet1/0/0
undo shutdown
ip address 192.168.1.253 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.1 active

[FW_2]
interface GigabitEthernet1/0/0
undo shutdown
ip address 192.168.1.254 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.1 standby

二、定义路由

ip route-static 0.0.0.0 0.0.0.0 下一跳地址

三、开启hrp功能

hrp enable

四、定义心跳接口

[FW_1]
hrp interface g1/0/6 remote 1.1.1.2 (对端设备IP)

[FW_2]
hrp interface g1/0/6 remote 1.1.1.1(对端设备IP)

五、备设备可以写命令
HRP_S[FW_2]hrp standby config enable

  • 0
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 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、付费专栏及课程。

余额充值