导航:首页 > 程序命令 > 华为防火墙命令行

华为防火墙命令行

发布时间:2022-07-03 17:16:49

㈠ 华为usg防火墙基本配置命令有哪些

步骤一.登陆缺省配置的防火墙并修改防火墙的名称
防火墙和路由器一样,有一个Console接口。使用console线缆将console接口和计算机的com口连接在一块。使用windows操作系统自带的超级终端软件,即可连接到防火墙。
防火墙的缺省配置中,包括了用户名和密码。其中用户名为admin、密码Admin@123,所以登录时需要输入用户名和密码信息,输入时注意区分大小写。
修改防火墙的名称的方法与修改路由器名称的方法一致。
另外需要注意的是,由于防火墙和路由器同样使用了VRP平台操作系统,所以在命令级别、命令帮助等,与路由器上相应操作相同。
<SRG>sys
13:47:28 2014/07/04
Enter system view, return user view withCtrl+Z.
[SRG]sysname FW
13:47:32 2014/07/04
步骤二.修改防火墙的时间和时区信息
默认情况下防火墙没有定义时区,系统保存的时间和实际时间可能不符。使用时应该根据实际的情况定义时间和时区信息。实验中我们将时区定义到东八区,并定义标准时间。
<FW>clock timezone 1 add 08:00:00
13:50:57 2014/07/04
<FW>dis clock
21:51:15 2014/07/03
2014-07-03 21:51:15
Thursday
Time Zone : 1 add 08:00:00
<FW>clock datetime 13:53:442014/07/04
21:53:29 2014/07/03
<FW>dis clock
13:54:04 2014/07/04
2014-07-04 13:54:04
Friday
Time Zone : 1 add 08:00:00
步骤三。修改防火墙登录标语信息
默认情况下,在登陆防火墙,登陆成功后有如下的标语信息。
Please Press ENTER.

Login authentication

Username:admin
Password:*********
NOTICE:This is a private communicationsystem.
Unauthorized access or use may lead to prosecution.
防火墙设备以此信息警告非授权的访问。
实际使用中,管理员可以根据需要修改默认的登陆标语信息。分为登录前提示信息和登陆成功后提示信息两种。
[FW]header login information ^
14:01:21 2014/07/04
Info: The banner text supports 220characters max, including the start and the en
d character.If you want to enter more thanthis, use banner file instead.
Input banner text, and quit with thecharacter '^':
Welcome to USG5500^
[FW]header shell information ^
14:02:54 2014/07/04
Info: The banner text supports 220characters max, including the start and the en
d character.If you want to enter more thanthis, use banner file instead.
Input banner text, and quit with thecharacter '^':
Welcome to USG5500
You are logining insystem Please do not delete system config files^
配置完成后,通过推出系统。然后重新登录,可以查看是否生效。
Please Press ENTER.

Welcome to USG5500

Login authentication

Username:admin
Password:*********
Welcome to USG5500
You are logining insystem Please do not delete system config files
NOTICE:This is a private communicationsystem.
Unauthorized access or use may lead to prosecution.
注意,默认达到NOTICE信息一般都会存在,不会消失或被代替。
步骤四.修改登陆防火墙的用户名和密码
防火墙默认使用的用户名admin。密码Admin@123。可以根据我们的需求进行修改。试验中我们新建一个用户,级别为level3.用户名为user1.密码:huawei@123.需要说明的是,默认情况下console接口登陆仅允许admin登陆。所以配置console接口登陆验证方式为aaa,才能确保新建的用户生效。在配置中,需要指定该配置的用户名的使用范围,本次实验中选择termianl,表示使用于通过console口登陆验证的凭据。
[FW]aaa
14:15:43 2014/07/04
[FW-aaa]local-user user1 pass
[FW-aaa]local-user user1 password cipherhuawei@123
14:16:08 2014/07/04
[FW-aaa]local-user user1 service-typeterminal
14:16:28 2014/07/04
[FW-aaa]local-user user1 level 3
14:16:38 2014/07/04
[FW-aaa]q
14:16:43 2014/07/04
[FW]user-interface console 0
14:16:57 2014/07/04
[FW-ui-console0]authentication-mode aaa
退出系统,测试新用户名和密码是否生效。
Please Press ENTER.

Welcome to USG5500

Login authentication

Username:user1
Password:**********
Welcome to USG5500
You are logining in system Please do notdelete system config files
NOTICE:This is a private communicationsystem.
Unauthorized access or use may lead to prosecution.
<FW>
步骤五.掌握查看、保存、和删除配置的方法。
在防火墙上使用命令查看运行的配置和已经保存的配置。其中使用display current-configuration命令查看运行配置,使用displaysaved-configuration命令查看已经保存的配置。
<FW>dis current-configuration
14:27:01 2014/07/04
#
stp region-configuration
region-name f0a7e2157008
active region-configuration
#
interface GigabitEthernet0/0/0
alias GE0/MGMT
ipaddress 192.168.0.1 255.255.255.0
dhcpselect interface
dhcpserver gateway-list 192.168.0.1
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/4
#
interface GigabitEthernet0/0/5
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface NULL0
alias NULL0
#
firewall zone local
setpriority 100
#
firewall zone trust
setpriority 85
addinterface GigabitEthernet0/0/0
#
firewall zone untrust
setpriority 5
#
firewall zone dmz
setpriority 50
#
aaa
local-user admin password cipher%$%$s$]c%^XV6(/|BaQ$[T;X"G>5%$%$
local-user admin service-type web terminaltelnet
local-user admin level 15
local-user user1 password cipher%$%$tY4Z:`xG0/G!1^C)2[48"%yp%$%$
local-user user1 service-type terminal
local-user user1 level 3
authentication-scheme default
#
authorization-scheme default
#
accounting-scheme default
#
domain default
#
#
nqa-jitter tag-version 1

#
header shell information "Welcome toUSG5500
You are logining in system Please do notdelete system config files"
header login information "Welcome toUSG5500"
banner enable
#
user-interface con 0
authentication-mode aaa
user-interface vty 0 4
authentication-mode none
protocol inbound all
#
slb
#
right-manager server-group
#
sysname FW
#
l2tpdomain suffix-separator @
#
firewall packet-filter default permitinterzone local trust direction inbound
firewall packet-filter default permitinterzone local trust direction outbound
firewall packet-filter default permitinterzone local untrust direction outbound

firewall packet-filter default permitinterzone local dmz direction outbound
#
ipdf-unreachables enable
#
firewall ipv6 session link-state check
firewall ipv6 statistic system enable
#
dnsresolve
#
firewall statistic system enable
#
pkiocsp response cache refresh interval 0
pkiocsp response cache number 0
#
undodns proxy
#
license-server domain lic.huawei.com
#
web-manager enable
#
return
保存配置,并查看以保存的配置信息。
<FW> sa
14:29:29 2014/07/04
The current configuration will be writtento the device.
Are you sure to continue?[Y/N]y
2014-07-04 14:29:31 FW %%01CFM/4/SAVE(l):When deciding whether to save configura
tion to the device, the user chose Y.
Do you want to synchronically save theconfiguration to the startup saved-configu
ration file on peer device?[Y/N]:y
Now saving the current configuration to thedevice...
Info:The current configuration was saved tothe device successfully.

<FW>dis saved-configuration
14:27:48 2014/07/04
# CLI_VERSION=V300R001

# Last configuration was changed at2014/07/04 13:56:09 from console0
#*****BEGIN****public****#
#
interface GigabitEthernet0/0/0
alias GE0/MGMT
ipaddress 192.168.0.1 255.255.255.0
dhcpselect interface
dhcpserver gateway-list 192.168.0.1
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/4
#
interface GigabitEthernet0/0/5
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface NULL0
alias NULL0
#
firewall zone local
setpriority 100
#
firewall zone trust
setpriority 85
addinterface GigabitEthernet0/0/0
#
firewall zone untrust
setpriority 5
#
firewall zone dmz
setpriority 50
#
aaa
local-user admin password cipher%$%$s$]c%^XV6(/|BaQ$[T;X"G>5%$%$
local-user admin service-type web terminaltelnet
local-useradmin level 15
authentication-scheme default
#
authorization-scheme default
#
accounting-scheme default
#
domain default
#
#
nqa-jitter tag-version 1

#
banner enable
#
user-interface con 0
authentication-mode none
user-interface vty 0 4
authentication-mode none
protocol inbound all
#
slb
#
right-manager server-group
#
sysname FW
#
l2tpdomain suffix-separator @
#
firewall packet-filter default permitinterzone local trust direction inbound
firewall packet-filter default permitinterzone local trust direction outbound
firewall packet-filter default permitinterzone local untrust direction outbound

firewall packet-filter default permitinterzone local dmz direction outbound
#
ipdf-unreachables enable
#
firewall ipv6 session link-state check
firewall ipv6 statistic system enable
#
dnsresolve
#
firewall statistic system enable
#
pkiocsp response cache refresh interval 0
pkiocsp response cache number 0
#
undodns proxy
#
license-server domain lic.huawei.com
#
web-manager enable
#
return
#-----END----#
使用delete Flash:/vrpcfg.zip命令删除保存的配置。
步骤六.配置接口地址
配置G0/0/1:10.0.2.1/24;G0/0/0:10.0.1.1/24;G0/0/2:10.0.3.1/24.
[FW] interface g0/0/2
16:12:58 2014/07/04
[FW-GigabitEthernet0/0/2]ip add 10.0.3.1 24
16:13:21 2014/07/04
[FW-GigabitEthernet0/0/2]interface g0/0/0
16:13:32 2014/07/04
[FW-GigabitEthernet0/0/0]undo ip add
16:14:02 2014/07/04
[FW-GigabitEthernet0/0/0]ip add 10.0.1.1 24
16:14:14 2014/07/04
[FW-GigabitEthernet0/0/0]interface g0/0/1
16:14:36 2014/07/04
[FW-GigabitEthernet0/0/1]ip add 10.0.2.1 24
16:14:50 2014/07/04
[FW-GigabitEthernet0/0/1]q
16:14:52 2014/07/04
[FW]
在交换机S1上配置接口G0/0/21属于vlan1、G0/0/22属于vlan2、G0/0/23属于vlan3.vlanif接口配置IP地址10.0.1.2/24、vlanif2接口配置IP地址10.0.2.2/24、vlanif3接口配置IP地址10.0.3.2/24。
[Huawei]sysname S1
[S1]vlan batch 2 3
[S1]interface g0/0/21
[S1-GigabitEthernet0/0/21]port link-typeaccess
[S1-GigabitEthernet0/0/21]port default vlan1
[S1-GigabitEthernet0/0/21]interface g0/0/22
[S1-GigabitEthernet0/0/22]port link-typeaccess
[S1-GigabitEthernet0/0/22]port default vlan2
[S1-GigabitEthernet0/0/22]interface g0/0/23
[S1-GigabitEthernet0/0/23]port link-typeaccess
[S1-GigabitEthernet0/0/23]port default vlan3
[S1-GigabitEthernet0/0/23]interface vlanif1
[S1-Vlanif1]ip add 10.0.1.2 24
[S1-Vlanif1]interface vlanif 2
[S1-Vlanif2]ip add 10.0.2.2 24
[S1-Vlanif2]interface vlanif 3
[S1-Vlanif3]ip add 10.0.3.2 24
将G0/0/0、G0/0/1、G0/0/2添加到trust区。在测试三口的连通性(在添加到trust区以前先确认这些端口不在untrust区)
[FW]firewall zone trust
16:39:40 2014/07/04
[FW-zone-trust]add interface g0/0/2
16:40:05 2014/07/04
[FW-zone-trust]add interface g0/0/3
16:41:59 2014/07/04
[FW-zone-trust]add interface g0/0/1
[FW-zone-trust]q
[S1]ping -c 1 10.0.1.1
PING 10.0.1.1: 56 data bytes,press CTRL_C to break
Reply from 10.0.1.1: bytes=56 Sequence=1 ttl=255 time=50 ms
---10.0.1.1 ping statistics ---
1packet(s) transmitted
1packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/50/50 ms
[S1]ping -c 1 10.0.2.1
PING 10.0.2.1: 56 data bytes,press CTRL_C to break
Reply from 10.0.2.1: bytes=56 Sequence=1 ttl=255 time=50 ms
---10.0.2.1 ping statistics ---
1packet(s) transmitted
1packet(s) received
0.00% packet loss
round-trip min/avg/max = 50/50/50 ms
[S1]ping -c 1 10.0.3.1
PING 10.0.3.1: 56 data bytes,press CTRL_C to break
Reply from 10.0.3.1: bytes=56 Sequence=1 ttl=255 time=60 ms
---10.0.3.1 ping statistics ---
1packet(s) transmitted
1packet(s) received
0.00% packet loss
round-trip min/avg/max = 60/60/60 ms

㈡ 华为防火墙命令行怎么输入问号

哦买噶,查看一下使用说明书或者手机自带的桌面软件“使用技巧”,若此两处无说明,则联系客服询问一下

㈢ 谁能给我整理一下华为防火墙的协议和命令

一、access-list 用于创建访问规则。 (1)创建标准访问列表 access-list [ normal | special ] listnumber1 { permit | deny } source-addr [ source-mask ]
(2)创建扩展访问列表 access-list [ normal | special ] listnumber2 { permit | deny } protocol source-addr source-mask [ operator port1 [ port2 ] ] dest-addr dest-mask [ operator port1 [ port2 ] | icmp-type [ icmp-code ] ] [ log ]
(3)删除访问列表 no access-list { normal | special } { all | listnumber [ subitem ] }
【参数说明】 normal 指定规则加入普通时间段。 special 指定规则加入特殊时间段。 listnumber1 是 1 到 99 之间的一个数值,表示规则是标准访问列表规则。 listnumber2 是 100 到 199 之间的一个数值,表示规则是扩展访问列表规则。 permit 表明允许满足条件的报文通过。 deny 表明禁止满足条件的报文通过。 protocol 为协议类型,支持 ICMP、TCP、UDP 等,其它的协议也支持,此时没有 端口比较的概念;为 IP 时有特殊含义,代表所有的 IP 协议。 source-addr 为源地址。 source-mask 为源地址通配位,在标准访问列表中是可选项,不输入则代表通配位 为 0.0.0.0。 dest-addr 为目的地址。 dest-mask 为目的地址通配位。 operator[可选] 端口操作符,在协议类型为 TCP 或 UDP 时支持端口比较,支持的 比较操作有:等于(eq) 、大于(gt) 、小于(lt) 、不等于(neq)或介于(range) ;如果 操作符为 range,则后面需要跟两个端口。 port1 在协议类型为 TCP 或 UDP 时出现, 可以为关键字所设定的预设值 (如 telnet) 或 0~65535 之间的一个数值。 port2 在协议类型为 TCP 或 UDP 且操作类型为 range 时出现; 可以为关键字所设定 的预设值(如 telnet)或 0~65535 之间的一个数值。 icmp-type[可选] 在协议为 ICMP 时出现,代表 ICMP 报文类型;可以是关键字所设 定的预设值(如 echo-reply)或者是 0~255 之间的一个数值。 icmp-code 在协议为 ICMP 且没有选择所设定的预设值时出现;代表 ICMP 码,是 0~255 之间的一个数值。 log [可选] 表示如果报文符合条件,需要做日志。
listnumber 为删除的规则序号,是 1~199 之间的一个数值。 subitem[可选] 指定删除序号为 listnumber 的访问列表中规则的序号。
firewall { enable | disable } 【参数说明】 enable 表示启用防火墙。 disable 表示禁止防火墙。
【缺省情况】 系统缺省为禁止防火墙。
【命令模式】 全局配置模式
【使用指南】 使用此命令来启用或禁止防火墙,可以通过 show firewall 命令看到相应结果。如果 采用了时间段包过滤,则在防火墙被关闭时也将被关闭;该命令控制防火墙的总开关。
在使用 firewall disable 命令关闭防火墙时,防火墙本身的统计信息也将被清除。
【举例】 启用防火墙。 Quidway(config)#firewall enable
【相关命令】 access-list,ip access-group 四、firewall default 配置防火墙在没有相应的访问规则匹配时,缺省的过滤方式。 firewall default { permit | deny }
【参数说明】
permit 表示缺省过滤属性设置为“允许”。
deny 表示缺省过滤属性设置为“禁止”。
【缺省情况】
在防火墙开启的情况下,报文被缺省允许通过。
【命令模式】
全局配置模式
【使用指南】
当在接口应用的规则没有一个能够判断一个报文是否应该被允许还是禁止时, 缺省 的过滤属性将起作用; 如果缺省过滤属性是“允许”, 则报文可以通过, 否则报文被丢弃。
【举例】
设置缺省过滤属性为“允许”。
Quidway(config)#firewall default permit 五、 access-group 使用此命令将规则应用到接口上。 ip 使用此命令的 no 形式来删除相应 的设置。
ip access-group listnumber { in | out }
[ no ] ip access-group listnumber { in | out }

㈣ 华为防火墙清空配置命令

华为防火墙清空配置命令。
清除配置文件的内容。用户可通过命令清除当前加载的配置文件的内容。在以下两种情况下,需要擦除储设备中的配置文件:在系统软件升级之后,软件和配置文件不匹配。发现配置文件遭到破坏,或加载了错误的配置文件。
操作步骤:执行命令resetsaved-configuration,清除当前加载的配置文件的内容。配置文件被清除后,如果不执行命令startupsaved-configuration重新指定含有正确配置信息的配置文件,或者不执行命令save保存配置文件,则设备下次启动时,将采用缺省的配置参数进行初始化。

㈤ 华为防火墙怎么打开固定的某个端口,请说下命令

showaccess-list[all|listnumber|interfaceinterface-name]【参数说明】all表示所有的规则,包括普通时间段内及特殊时间段内的规则。listnumber为显示当前所使用的规则中序号为listnumber的规则。interface表示要显示在指定接口上应用的规则序号。interface-name为接口的名称。【命令模式】特权用户模式【使用指南】使用此命令来显示所指定的规则,同时查看规则过滤报文的情况。每个规则都有一个相应的计数器,如果用此规则过滤了一个报文,则计数器加1;通过对计数器的观察可以看出所配置的规则中,哪些规则是比较有效,而哪些基本无效。可以通过带interface关键字的showaccess-list命令来查看某个接口应用规则的情况。【举例】例1:显示当前所使用的序号为100的规则。Quidway#showaccess-list100Usingnormalpacket-filteringaccessrulesnow.100denyicmp10.1.0.00.0.255.255anyhost-redirect(3matches,252bytes--rule1)100permiticmp10.1.0.00.0.255.255anyecho(nomatches--rule2)100denyudpanyanyeqrip(nomatches--rule3)例2:显示接口Serial0上应用规则的情况。Quidway#showaccess-listinterfaceserial0Serial0:access-listfilteringIn-boundpackets:120access-listfilteringOut-boundpackets:None【相关命令】access-list八、showfirewall显示防火墙状态。showfirewall【命令模式】特权用户模式【使用指南】使用此命令来显示防火墙的状态,包括防火墙是否被启用,启用防火墙时是否采用了时间段包过滤及防火墙的一些统计信息。【举例】显示防火墙状态。Quidway#showfirewallFirewallisenable,defaultfilteringmethodis'permit'.TimeRangepacket-filteringenable.InBoundpackets:None;OutBoundpackets:0packets,0bytes,0%permitted,0packets,0bytes,0%denied,2packets,104bytes,100%permitteddefaultly,0packets,0bytes,100%denieddefaultly.From00:13:02to06:13:21:0packets,0bytes,permitted.【相关命令】firewall

㈥ 华为某个型号防火墙的基本配置命令

为路由器防火墙配置命令总结

一、access-list 用于创建访问规则。
(1)创建标准访问列表

access-list [ normal | special ] listnumber1 { permit | deny } source-addr [ source-mask ]

(2)创建 <-- Script Filtered/n/n-->扩展访问列表

access-list [ normal | special ] listnumber2 { permit | deny } protocol source-addr source-mask [ operator port1 [ port2 ] ] dest-addr dest-mask [ operator port1 [ port2 ] | icmp-type [ icmp-code ] ] [ log ]

(3)删除访问列表

no access-list { normal | special } { all | listnumber [ subitem ] }

【参数说明】

normal 指定规则加入普通时间段。

special 指定规则加入特殊时间段。

listnumber1 是1到99之间的一个数值,表示规则是标准访问列表规则。

listnumber2 是100到199之间的一个数值,表示规则是扩展访问列表规则。

permit 表明允许满足条件的报文通过。

deny 表明禁止满足条件的报文通过。

protocol 为协议类型,支持ICMP、TCP、UDP等,其它的协议也支持,此时没有端口比较的概念;为IP时有特殊含义,代表所有的IP协议。

source-addr 为源地址。

source-mask 为源地址通配位,在标准访问列表中是可选项,不输入则代表通配位为0.0.0.0。

dest-addr 为目的地址。

dest-mask 为目的地址通配位。

operator[可选] 端口操作符,在协议类型为TCP或UDP时支持端口比较,支持的比较操作有:等于(eq)、大于(gt)、小于(lt)、不等于(neq)或介于(range);如果操作符为range,则后面需要跟两个端口。

port1 在协议类型为TCP或UDP时出现,可以为关键字所设定的预设值(如telnet)或0~65535之间的一个数值。

port2 在协议类型为TCP或UDP且操作类型为range时出现;可以为关键字所设定的预设值(如telnet)或0~65535之间的一个数值。

icmp-type[可选] 在协议为ICMP时出现,代表ICMP报文类型;可以是关键字所设定的预设值(如echo-reply)或者是0~255之间的一个数值。

icmp-code在协议为ICMP且没有选择所设定的预设值时出现;代表ICMP码,是0~255之间的一个数值。

log [可选] 表示如果报文符合条件,需要做日志。

listnumber 为删除的规则序号,是1~199之间的一个数值。

subitem[可选] 指定删除序号为listnumber的访问列表中规则的序号。

【缺省情况】

系统缺省不配置任何访问规则。

【命令模式】

全局配置模式
【使用指南】

同一个序号的规则可以看作一类规则;所定义的规则不仅可以用来在接口上过滤报文,也可以被如DDR等用来判断一个报文是否是感兴趣的报文,此时,permit与deny表示是感兴趣的还是不感兴趣的。

使用协议域为IP的扩展访问列表来表示所有的IP协议。

同一个序号之间的规则按照一定的原则进行排列和选择,这个顺序可以通过 show access-list 命令看到。

【举例】

允许源地址为10.1.1.0 网络、目的地址为10.1.2.0网络的WWW访问,但不允许使用FTP。
Quidway(config)#access-list 100 permit tcp 10.1.1.0 0.0.0.255 10.1.2.0 0.0.0.255 eq www

Quidway(config)#access-list 100 deny tcp 10.1.1.0 0.0.0.255 10.1.2.0 0.0.0.255 eq ftp

【相关命令】

ip access-group

二、clear access-list counters 清除访问列表规则的统计信息。

clear access-list counters [ listnumber ]

【参数说明】

listnumber [可选] 要清除统计信息的规则的序号,如不指定,则清除所有的规则的统计信息。

【缺省情况】

任何时候都不清除统计信息。

【命令模式】

特权用户模式

【使用指南】

使用此命令来清除当前所用规则的统计信息,不指定规则编号则清除所有规则的统计信息。

【举例】

例1:清除当前所使用的序号为100的规则的统计信息。

Quidway#clear access-list counters 100

例2:清除当前所使用的所有规则的统计信息。

Quidway#clear access-list counters

【相关命令】

access-list

三、firewall 启用或禁止防火墙。

firewall { enable | disable }

【参数说明】

enable 表示启用防火墙。

disable 表示禁止防火墙。

【缺省情况】

系统缺省为禁止防火墙。

【命令模式】

全局配置模式

【使用指南】

使用此命令来启用或禁止防火墙,可以通过show firewall命令看到相应结果。如果采用了时间段包过滤,则在防火墙被关闭时也将被关闭;该命令控制防火墙的总开关。在使用 firewall disable 命令关闭防火墙时,防火墙本身的统计信息也将被清除。

【举例】

启用防火墙。

Quidway(config)#firewall enable

【相关命令】
access-list,ip access-group

四、firewall default 配置防火墙在没有相应的访问规则匹配时,缺省的过滤方式。

firewall default { permit | deny }

【参数说明】

permit 表示缺省过滤属性设置为“允许”。

deny 表示缺省过滤属性设置为“禁止”。

【缺省情况】

在防火墙开启的情况下,报文被缺省允许通过。

【命令模式】

全局配置模式

【使用指南】

当在接口应用的规则没有一个能够判断一个报文是否应该被允许还是禁止时,缺省的过滤属性将起作用;如果缺省过滤属性是“允许”,则报文可以通过,否则报文被丢弃。

【举例】

设置缺省过滤属性为“允许”。

Quidway(config)#firewall default permit

五、ip access-group 使用此命令将规则应用到接口上。使用此命令的no形式来删除相应的设置。

ip access-group listnumber { in | out }

[ no ] ip access-group listnumber { in | out }

【参数说明】

listnumber 为规则序号,是1~199之间的一个数值。

in 表示规则用于过滤从接口收上来的报文。

out 表示规则用于过滤从接口转发的报文。

【缺省情况】

没有规则应用于接口。

【命令模式】

接口配置模式。

【使用指南】

使用此命令来将规则应用到接口上;如果要过滤从接口收上来的报文,则使用 in 关键字;如果要过滤从接口转发的报文,使用out 关键字。一个接口的一个方向上最多可以应用20类不同的规则;这些规则之间按照规则序号的大小进行排列,序号大的排在前面,也就是优先级高。对报文进行过滤时,将采用发现符合的规则即得出过滤结果的方法来加快过滤速度。所以,建议在配置规则时,尽量将对同一个网络配置的规则放在同一个序号的访问列表中;在同一个序号的访问列表中,规则之间的排列和选择顺序可以用show access-list命令来查看。

【举例】

将规则101应用于过滤从以太网口收上来的报文。

Quidway(config-if-Ethernet0)#ip access-group 101 in

【相关命令】

access-list

六、settr 设定或取消特殊时间段。

settr begin-time end-time

no settr

【参数说明】

begin-time 为一个时间段的开始时间。

end-time 为一个时间段的结束时间,应该大于开始时间。

【缺省情况】
系统缺省没有设置时间段,即认为全部为普通时间段。

【命令模式】

全局配置模式

【使用指南】

使用此命令来设置时间段;可以最多同时设置6个时间段,通过show timerange 命令可以看到所设置的时间。如果在已经使用了一个时间段的情况下改变时间段,则此修改将在一分钟左右生效(系统查询时间段的时间间隔)。设置的时间应该是24小时制。如果要设置类似晚上9点到早上8点的时间段,可以设置成“settr 21:00 23:59 0:00 8:00”,因为所设置的时间段的两个端点属于时间段之内,故不会产生时间段内外的切换。另外这个设置也经过了2000问题的测试。

【举例】

例1:设置时间段为8:30 ~ 12:00,14:00 ~ 17:00。

Quidway(config)#settr 8:30 12:00 14:00 17:00

例2: 设置时间段为晚上9点到早上8点。

Quidway(config)#settr 21:00 23:59 0:00 8:0

【相关命令】

timerange,show timerange

七、show access-list 显示包过滤规则及在接口上的应用。

show access-list [ all | listnumber | interface interface-name]
【参数说明】

all 表示所有的规则,包括普通时间段内及特殊时间段内的规则。

listnumber 为显示当前所使用的规则中序号为listnumber的规则。

interface 表示要显示在指定接口上应用的规则序号。

interface-name 为接口的名称。

【命令模式】

特权用户模式

【使用指南】

使用此命令来显示所指定的规则,同时查看规则过滤报文的情况。每个规则都有一个相应的计数器,如果用此规则过滤了一个报文,则计数器加1;通过对计数器的观察可以看出所配置的规则中,哪些规则是比较有效,而哪些基本无效。可以通过带interface关键字的show access-list命令来查看某个接口应用规则的情况。

【举例】

例1:显示当前所使用的序号为100的规则。

Quidway#show access-list 100

Using normal packet-filtering access rules now.

100 deny icmp 10.1.0.0 0.0.255.255 any host-redirect (3 matches,252 bytes -- rule 1)

100 permit icmp 10.1.0.0 0.0.255.255 any echo (no matches -- rule 2)

100 deny udp any any eq rip (no matches -- rule 3)

例2: 显示接口Serial0上应用规则的情况。

Quidway#show access-list interface serial 0

Serial0:

access-list filtering In-bound packets : 120
access-list filtering Out-bound packets: None

【相关命令】

access-list

八、show firewall 显示防火墙状态。

show firewall

【命令模式】

特权用户模式

【使用指南】

使用此命令来显示防火墙的状态,包括防火墙是否被启用,启用防火墙时是否采用了时间段包过滤及防火墙的一些统计信息。
【举例】

显示防火墙状态。

Quidway#show firewall

Firewall is enable, default filtering method is 'permit'.

TimeRange packet-filtering enable.

InBound packets: None;

OutBound packets: 0 packets, 0 bytes, 0% permitted,

0 packets, 0 bytes, 0% denied,

2 packets, 104 bytes, 100% permitted defaultly,

0 packets, 0 bytes, 100% denied defaultly.

From 00:13:02 to 06:13:21: 0 packets, 0 bytes, permitted.

【相关命令】

firewall

九、show isintr 显示当前时间是否在时间段之内。

show isintr

【命令模式】

特权用户模式

【使用指南】

使用此命令来显示当前时间是否在时间段之内。

【举例】

显示当前时间是否在时间段之内。

Quidway#show isintr

It is NOT in time ranges now.

【相关命令】

timerange,settr

十、show timerange 显示时间段包过滤的信息。

show timerange

【命令模式】

特权用户模式

【使用指南】

使用此命令来显示当前是否允许时间段包过滤及所设置的时间段。

【举例】

显示时间段包过滤的信息。

Quidway#show timerange

TimeRange packet-filtering enable.

beginning of time range:

01:00 - 02:00

03:00 - 04:00

end of time range.

【相关命令】

timerange,settr

十一、timerange 启用或禁止时间段包过滤功能。

timerange { enable | disable }

【参数说明】

enable 表示启用时间段包过滤。

disable 表示禁止采用时间段包过滤。
【缺省情况】

系统缺省为禁止时间段包过滤功能。

【命令模式】

全局配置模式

【使用指南】

使用此命令来启用或禁止时间段包过滤功能,可以通过show firewall命令看到,也可以通过show timerange命令看到配置结果。在时间段包过滤功能被启用后,系统将根据当前的时间和设置的时间段来确定使用时间段内(特殊)的规则还是时间段外(普通)的规则。系统查询时间段的精确度为1分钟。所设置的时间段的两个端点属于时间段之内。

【举例】

启用时间段包过滤功能。

Quidway(config)#timerange enable

【相关命令】

settr,show timerange

㈦ 华为100F防火墙启动WEB管理命令

show access-list [ all | listnumber | interface interface-name]

【参数说明】

all 表示所有的规则,包括普通时间段内及特殊时间段内的规则。

listnumber 为显示当前所使用的规则中序号为listnumber的规则。

interface 表示要显示在指定接口上应用的规则序号。

interface-name 为接口的名称。

【命令模式】

特权用户模式

【使用指南】

使用此命令来显示所指定的规则,同时查看规则过滤报文的情况。每个规则都有一个相应的计数器,如果用此规则过滤了一个报文,则计数器加1;通过对计数器的观察可以看出所配置的规则中,哪些规则是比较有效,而哪些基本无效。可以通过带interface关键字的show access-list命令来查看某个接口应用规则的情况。

【举例】

例1:显示当前所使用的序号为100的规则。

Quidway#show access-list 100Using normal packet-filtering access rules now.100 deny icmp 10.1.0.0 0.0.255.255 any host-redirect (3 matches,252 bytes -- rule 1)100 permit icmp 10.1.0.0 0.0.255.255 any echo (no matches -- rule 2)100 deny udp any any eq rip (no matches -- rule 3)

例2: 显示接口Serial0上应用规则的情况。

Quidway#show access-list interface serial 0Serial0:access-list filtering In-bound packets : 120access-list filtering Out-bound packets: None

【相关命令】

access-list

八、show firewall 显示防火墙状态。

show firewall

【命令模式】

特权用户模式

【使用指南】

使用此命令来显示防火墙的状态,包括防火墙是否被启用,启用防火墙时是否采用了时间段包过滤及防火墙的一些统计信息。

【举例】

显示防火墙状态。

Quidway#show firewallFirewall is enable, default filtering method is 'permit'.TimeRange packet-filtering enable.InBound packets: None;OutBound packets: 0 packets, 0 bytes, 0% permitted,0 packets, 0 bytes, 0% denied,2 packets, 104 bytes, 100% permitted defaultly,0 packets, 0 bytes, 100% denied defaultly.From 00:13:02 to 06:13:21: 0 packets, 0 bytes, permitted.

【相关命令】

firewall

㈧ 华为防火墙IPsecVPN配置命令是什么急啊。。。

你可以去H3C官方网站的服务支持-文档中心-查找路由器的文档。
这种命令行配置的路由器建立ipsec
vpn
关键点很多。没有这块基础的普通用户很难自己搞定。
建议找代理商解决。
另外从网上找了点资料,你看看有没有用。
给你个ipsec
over
gre
的脚本,自己研究下
ike
peer
center
/配置到中心的ike
peer/
exchange-mode
aggressive
/设置IPSec为野蛮方式/
pre-shared-key
abc
/预共享密钥为abc/
id-type
name
/选择名字作为ike协商过程中使用的ID/
remote-name
center
/对端的名字为center/
remote-address
10.0.0.1
/对端的地址为10.0.0.1(中心的tunnel地址)/
#
ipsec
proposal
1
/定义ipsec
proposal/
#
ipsec
policy
branch1
10
isakmp
/配置到中心的ipsec
policy/
security
acl
3001
/指定安全策略所引用的访问控制列表号/
ike-peer
center
/引用ike
peer/
proposal
1
/引用ipsec
proposal/
#
acl
number
3001
/定义从分部1到中心的内网数据流/
rule
0
permit
ip
source
192.168.2.0
0.0.0.255
destination
192.168.1.0
0.0.0.255
#
interface
Serial2/0
link-protocol
ppp
ip
address
202.101.2.2
255.255.255.252
#
interface
Tunnel0
/配置分部1和中心之间的GRE
tunnel/
ip
address
10.0.0.2
255.255.255.252
source
202.101.2.2
destination
202.101.1.2
ipsec
policy
branch1
/在tunnel
0上应用IPSec
policy
branch1/
#

㈨ 华为防火墙配置命令gateway-lsit是什么意思呢

gateway-list 意思是:指定网关。

华为防火墙配置命令:

建立DHCP地址池0[Quidway] dhcp server ip-pool 0;

配置DHCP网段 [Quidway-dhcp0] network 192.168.8.0 mask 255.255.255.0 ;

配置DNS序列 [Quidway-dhcp0] dns-list ip-address1 [ ip-address2 ... ip-address8 ];

配置默认网关序列 [Quidway-dhcp0] gateway-list ip-address1 [ ip-address2 ... ip-address8 ];

设置DHCP租用时间为1天2小时3分钟[Quidway-dhcp0] expired 1 2 3。

(9)华为防火墙命令行扩展阅读:

华为防火墙的双机热备包含以下两种模式:

热备模式:同一时间只有一台防火墙转发数据,其他防火墙不转发,但是会同步会话表及server-map表,当目前工作的防火墙宕机以后,备份防火墙接替转发数据的工作。

负载均衡模式:同一时间内,多台防火墙同时转发数据,并且互为备份,每个防火墙既是主设备,也是备用设备。防火墙之间同步会话表及server-map表。

㈩ 查看华为防火墙上的用户命令是什么

如果是看都配置了什么用户
使用dis
cu
命令查看,找到local-user
xxxxx
的命令就是用户了。xxxxx是用户名
如果是查看当前哪个用户使用web或telnet登录了使用
dis
users
查看

阅读全文

与华为防火墙命令行相关的资料

热点内容
怎么购买离岸服务器 浏览:282
加密市场监管信息汇总 浏览:677
程序的加密文件是哪个 浏览:400
app首屏图一张图怎么做 浏览:499
如何重启数据库服务器 浏览:660
联通程序员发展怎么样 浏览:709
山东省联想服务器供货商云空间 浏览:147
鸿天神尊小说哪个app可以看 浏览:396
做程序员的没朋友吗 浏览:360
阿里云服务器传奇微端 浏览:924
phplinux时间 浏览:452
云服务器20性能 浏览:986
android强制系统横屏 浏览:283
怎么提前看未播出的电视剧app 浏览:666
cad转pdf图层 浏览:602
程序员接私活初级 浏览:436
全无油润滑压缩机 浏览:188
代码加密常用方法 浏览:956
安卓手机如何解除已禁用 浏览:398
算法的随机性 浏览:489