2017-11-30  7,767 views 评论

华为防火墙常用配置命令

华为防火墙Edumon1000E,配置有四个光电互斥接口,为千兆状态防火墙。默认情况下所有区域之间不允许有流量经过。
本文为Edumon1000E的基本配置,该基本配置适用一般企业级单机接入情况。
配置一台防火墙主要包含以下几个步骤:
1、配置端口IP,并将指定端口加入Untrust/trust/DMZ区域;
2、配置默认路由指向公网;
3、配置NAT,允许内部用户通过防火墙进行地址转换上公网;
4、开放内部服务器的指定端口,允许通过公网访问指定内部服务器;
5、配置防火墙允许通过ssh 或telnet远程管理;第一次配置必须使用console口进行配置;
注意:防火墙默认情况下所有区域之间包过滤规则为deny all,当出现网络不通情况时,除检查相关路由配置外,还要注意是否配置相应的ACL允许数据包通过。
默认情况下无法ping通过防火墙各端口,也是因为没有相关ACL规则导致。
[Eudemon]display current-configuration
09:54:21  2010/04/27
# 增加acl 2001允许内网用户NAT上Internet
acl number 2001
rule 0 permit source 172.40.0.0 0.0.255.255
rule 2 permit source 192.168.0.0 0.0.255.255
# 增加ACL 3001允许通过外网访问内部服务器指定端口
acl number 3001
rule 0 permit tcp destination 172.40.1.16 0 destination-port eq 9080
rule 1 permit tcp destination 172.40.1.16 0 destination-port eq 5631
rule 2 permit tcp destination 172.40.1.16 0 destination-port eq 5632
rule 3 permit tcp destination 172.40.1.17 0 destination-port eq 5631
rule 4 permit tcp destination 172.40.1.17 0 destination-port eq 5632
rule 5 permit tcp destination 172.40.1.18 0 destination-port eq 5631
rule 6 permit tcp destination 172.40.1.18 0 destination-port eq 5632
rule 7 permit tcp destination 172.40.1.16 0 destination-port eq 6129
acl number 3010 //ACL 3010允许公网用户通过ssh访问防火墙
rule 0 permit tcp destination 11.18.13.4 0 destination-port eq ssh
#
sysname Eudemon
#设置local到trust区域的默认防火墙包过滤规则
firewall packet-filter default permit interzone local trust direction inbound
firewall packet-filter default permit interzone local trust direction outbound
#配置全局NAT和指定端口映射。
nat address-group 1 11.18.13.4 11.18.13.4
nat server zone untrust protocol tcp global 11.18.13.4 9080 inside 172.40.1.16 9080
nat server zone untrust protocol tcp global 11.18.13.4 5631 inside 172.40.1.16 5631
nat server zone untrust protocol tcp global 11.18.13.4 5632 inside 172.40.1.16 5632
nat server zone untrust protocol tcp global 11.18.13.4 5633 inside 172.40.1.17 5631
nat server zone untrust protocol tcp global 11.18.13.4 5634 inside 172.40.1.17 5632
nat server zone untrust protocol tcp global 11.18.13.4 5635 inside 172.40.1.18 5631
nat server zone untrust protocol tcp global 11.18.13.4 5636 inside 172.40.1.18 5632
nat server zone untrust protocol tcp global 11.18.13.4 6129 inside 172.40.1.16 6129
#
firewall statistic system enable
#G0/0/0连接到外网,配置IP;
interface GigabitEthernet0/0/0
description link_to_internet
ip address 11.18.13.4 255.255.255.0
#G0/0/1连接到内网,配置IP;
interface GigabitEthernet0/0/1
description Link_to_inside
ip address 192.168.10.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
interface NULL0
#
firewall zone local
set priority 100
#将G0/0/1加入trust
firewall zone trust
set priority 85
add interface GigabitEthernet0/0/1
#将G0/0/0加入untrust
firewall zone untrust
set priority 5
add interface GigabitEthernet0/0/0
#
firewall zone dmz
set priority 50
#
firewall zone vzone
set priority 0
#应用ACL 3010
firewall interzone local untrust
packet-filter 3010 inbound
#应用ACL 3001 、ACL 2001、NAT 2001
firewall interzone trust untrust
packet-filter 3001 inbound
packet-filter 2001 outbound
nat outbound 2001 address-group 1
#配置aaa用户,用于ssh登录
aaa
local-user admin password simple admin
local-user admin service-type web ssh
authentication-scheme default
#
authorization-scheme default
#
accounting-scheme default
#
domain default
#
#
right-manager server-group
#
slb
#配置静态路由及默认路由
ip route-static 0.0.0.0 0.0.0.0 11.18.13.1
ip route-static 172.40.1.0 255.255.255.0 192.168.10.1
ip route-static 192.168.0.0 255.255.0.0 192.168.10.1
#设置ssh user认证方式
ssh user admin authentication-type password
#配置vty,设置认证模式为aaa,允许ssh登录vty
user-interface con 0
user-interface vty 0 4
authentication-mode aaa
user privilege level 3
protocol inbound ssh
#
return

原创文章或网络摘录,转载请注明: 转载自守候的时光

本文链接地址: 华为防火墙常用配置命令

打赏

给我留言

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: