华为USG防火墙运维命令大全
华为 防火墙命令总结

(2)action nateasy-ip
6
查看配置结果:
dis nat-policy all//查询nat列表
display nat-policy rulenat1//查询nat具体配置信息
display firewall session table //查看nat地址转换信息
2
添加地址段:注意,需要用反掩码
[USG-object-address-set-ip_deny]address192.168.5.0 0.0.0.255
可以添加单个IP地址
[USG-object-address-set-ip_deny]address192.168.5.2 0
3.5 eNSP软件排错
[USG6000V1-GigabitEthernet1/0/0]ip add 192.168.1.2 24
或者:
[USG6000V1-GigabitEthernet1/0/0]ip add 192.168.1.2 255.255.255.0
2.
将接口加入到相应的安全区域
[USG6000V1]firewall zone trust(untrust或dmz)
4.
查看配置某个时间段配置结果:
display time-range[time-range name:string]
5.
查看配置所有时间段配置结果:
display time-range all:
6
配置基于时间段的策略
在策略内配置:
time-range[time-range name]
3.3基于安全区的策略配置
华为防火墙USG配置

内网:配置GigabitEthernet 0/0/1加入Trust区域[USG5300] firewall zone trust[USG5300-zone-untrust] add interface GigabitEthernet 0/0/1外网:配置GigabitEthernet 0/0/2加入Untrust区域[USG5300] firewall zone untrust[USG5300-zone-untrust] add interface GigabitEthernet 0/0/2DMZ:[USG5300] firewall zone dmz[USG5300-zone-untrust] add interface GigabitEthernet 0/0/3[USG5300-zone-untrust] quit1.4.1 Trust和Untrust域间:允许内网用户访问公网policy 1:允许源地址为10.10.10.0/24的网段的报文通过[USG5300] policy interzone trust untrust outbound[USG5300-policy-interzone-trust-untrust-outbound] policy 1[USG5300-policy-interzone-trust-untrust-outbound-1] policy source 10.10.10.0 0.0.0.255[USG5300-policy-interzone-trust-untrust-outbound-1] action permit[USG5300-policy-interzone-trust-untrust-outbound-1] quit如果是允许所有的内网地址上公网可以用以下命令:[USG2100]firewall packet-filter default permit interzone trust untrust direction outbound //必须1.4.2 DMZ和Untrust域间:从公网访问内部服务器policy 2:允许目的地址为10.10.11.2,目的端口为21的报文通过policy 3:允许目的地址为10.10.11.3,目的端口为8080的报文通过[USG5300] policy interzone untrust dmz inbound[USG5300-policy-interzone-dmz-untrust-inbound] policy 2[USG5300-policy-interzone-dmz-untrust-inbound-2] policy destination 10.10.11.3 0 [USG5300-policy-interzone-dmz-untrust-inbound-2] policy service service-set ftp [USG5300-policy-interzone-dmz-untrust-inbound-2] action permit[USG5300-policy-interzone-dmz-untrust-inbound-2] quit[USG5300-policy-interzone-dmz-untrust-inbound] policy 3[USG5300-policy-interzone-dmz-untrust-inbound-3] policy destination 10.10.11.2 0[USG5300-policy-interzone-dmz-untrust-inbound-3]policy service service-set http [USG5300-policy-interzone-dmz-untrust-inbound-3] action permit[USG5300-policy-interzone-dmz-untrust-inbound-3] quit[USG5300-policy-interzone-dmz-untrust-inbound] quit配置内部服务器:<USG5300> system-view[USG5300] nat server protocol tcp global 220.10.10.16 8080 inside 10.10.11.2 www [USG5300] nat server protocol tcp global 220.10.10.17 ftp inside 10.10.11.3 ftpNAT2、通过公网接口的方式创建Trust区域和Untrust区域之间的NAT策略,确定进行NAT转换的源地址范围192.168.1.0/24网段,并且将其与外网接口GigabitEthernet 0/0/4进行绑定。
Usg5500系列危险操作与常用维护命令

authentication-mode
验证登录用户
user-interface视图
在配置Console,VTY等用户验证时,验证方式为password或AAA,必须配置密码或用户名,否则将无法登录。
系统维护
startup system-softwarefilename
设置下次启动使用的系统文件
用户视图
保证下次启动文件的正确性,否则会造成系统版本或配置不正确。
清除会话
reset firewall session table
清除系统当维护命令如表1所示。
表1常用维护命令表
命令
视图
功能描述
dir[/all] [filename]
用户视图
查看设备中的指定文件或目录的信息。
所有视图
查看设备当前生效的配置参数。
display fib statistics
所有视图
查看FIB表项的总数目。
display device[ slot-id ]
所有视图
查看设备的基本信息。
display ftp-server
所有视图
查看当前FTP服务器的各项参数。
display interface[ interface-type [ interface-number ] ]
格式化操作
formatdevice-name
格式化存储设备
用户视图
执行该命令进行格式化操作,将导致指定的存储设备上所有的文件丢失,并且不可恢复。
删除操作
delete[ /unreserved]filename
删除存储设备中的指定文件
用户视图
该命令用来删除存储设备中的指定文件,如果使用了unreserved,会彻底删除指定文件,删除的文件将不可恢复。
Juniper华为H3C设备维护通用命令

Juniper华为H3C设备维护通用命令Juniper_华为_H3C设备维护常用命令1、[Router&Swithc]华为/H3C设备常规巡检命令#系统时间display clock#系统以及各单板软件版本display version#设备温度display environment#日志信息display logbuffer#单板运行状态display device#电源状态display device#风扇状态display device#CPU占用状态display cpu-usage#内存占用率display memory limit#接口流量display interface#接口、链路状态display interface#地址分配display current-configuration interface##路由扩散display current-configuration | include ospf#OSPF(Open Shortest Path First)配置display router id#路由信息display ip routing-table#端口统计数据display ip interface#当前配置文件display current-configuration#保存配置文件display saved-configuration端口使用状态display interface GigabitEthernet/T en-GigabitEthernet brief VLAN使用状态display ip interface brief2、脚本—华为display versiondis patch-informationdisplay clockdis dustproofdis frame-typedis healthdisplay cpu-usagedisplay memorydisplay memory limitdisplay devicedisplay device manuinfodisplay powerdisplay fandisplay voltagedir cfcard2:/dir cfcard:display device pic-statusdis switchover statedisplay environmentdisplay interfacedisplay logbufferdis alarmdis bootrom ethernetdisplay current-configurationdisplay current-configuration interface#display router iddisplay ip routing-tabledisplay ip interfacedisplay ip interface briefdisplay current-configurationdisplay saved-configurationdisplay diagnostic-information3、脚本—华为NE40edisplay version 查看VRP版本等信息dis patch-information 查看版本补丁display clock 查看时钟dis dustproof 防尘网信息Dis frame-type 显示NE40E机框类型dis health 显示系统资源的使用情况display cpu-usage 查看1分钟CPU利用率display memory 查看内存使用情况display memory limitdisplay device 查看母板信息display device manuinfodisplay power 查看电源状态display fan 查看风扇状态display voltage 查看板卡电压dir cfcard2:/ 查看设备crash信息dir cfcard: 查看设备cf卡信息display device pic-status 查看子卡型号,序列号(NE40E NE80E) dis switchover state 查看引擎HA情况display environmentdisplay interface 查看接口状态display logbuffer 查看日志dis alarm 查看设备告警dis bootrom ethernet 查看设备bootrom信息display current-configuration查看当前配置display current-configuration interface# 查看设备当前接口配置display router id 查看设备路由IDdisplay ip routing-table 查看设备路由display ip interface 查看设备接口情况display ip interface brief 查看设备接口状态display current-configuration 查看设备当前配置display saved-configuration 查看设备内存配置(相当show start)display diagnostic-information 抓取设备完整信息相对于show tech二、JUNIPER设备常用维护巡检命令1、脚本—JUNIPERshow system uptimeshow version detailshow chassis hardware detailshow chassis environment //显示设备的环境信息,包括温度、风扇状况、电源状况、路由引擎状况。
华为usg防火墙基本配置命令有哪些.doc

华为usg防火墙基本配置命令有哪些修改防火墙的时间和时区信息默认情况下防火墙没有定义时区,系统保存的时间和实际时间可能不符。
使用时应该根据实际的情况定义时间和时区信息。
实验中我们将时区定义到东八区,并定义标准时间。
clock timezone 1 add 08:00:0013:50:57 2014/07/04dis clock21:51:15 2014/07/032014-07-03 21:51:15ThursdayTime Zone : 1 add 08:00:00clock datetime 13:53:442014/07/0421:53:29 2014/07/03dis clock13:54:04 2014/07/042014-07-04 13:54:04FridayTime Zone : 1 add 08:00:00修改防火墙登录标语信息默认情况下,在登陆防火墙,登陆成功后有如下的标语信息。
Please Press ENTER.Login authenticationUsername:adminPassword:*********NOTICE:This is a private communicationsystem.Unauthorized access or use may lead to prosecution.防火墙设备以此信息警告非授权的访问。
实际使用中,管理员可以根据需要修改默认的登陆标语信息Please Press ENTER.Welcome to USG5500Login authenticationUsername:adminPassword:*********Welcome to USG5500You are logining insystem Please do not delete system config filesNOTICE:This is a private communicationsystem.Unauthorized access or use may lead to prosecution.注意,默认达到NOTICE信息一般都会存在,不会消失或被代替。
华为USG设备配置脚本及联通最新路由表

USG2000基础配置手册初始化设备:reset saved-configurationREBOOTNY1.# 进入系统视图。
<USG> system-view# 进入Ethernet 0/0/0视图。
[USG A] interface Ethernet 0/0/0# 配置Ethernet 0/0/0(公网)的IP地址。
[USG A-Ethernet0/0/0] ip address 61.163.165.108 255.255.255.128 #公网IP,运营商提供# 退回系统视图。
[USG A-Ethernet0/0/0] quit2.# 进入Ethernet 0/0/1视图。
[USG A] interface Ethernet 0/0/1# 配置内部局域网Ethernet 0/0/1的IP地址。
[USG A-Ethernet0/0/1] ip address 192.168.0.1 255.255.255.0[USG A-Ethernet0/0/1] dhcp select interface# 退回系统视图。
[USG A-Ethernet0/0/1] quit3.# 进入Trust区域视图。
[USG A] firewall zone trust# 配置Ethernet 0/0/1加入Trust区域。
#通常内网在trust区域[USG A-zone-trust] add interface Ethernet 0/0/1# 退回系统视图。
[USG A-zone-trust] quit# 进入Untrust区域视图。
[USG A] firewall zone untrust# 配置Ethernet 0/0/0加入Untrust区域。
#通常外网在untrust区域[USG A-zone-untrust] add interface Ethernet 0/0/0# 退回系统视图。
[USG A-zone-untrust] quit4.#配置需要上网的ACL[USG] acl 2000[USG-acl-basic-2000] rule permit[USG-acl-basic-2000] quit5.# 配置NAT地址池。
华为路由器防火墙配置命令详细解释

一、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,则后面需要跟两个端口。
华为USG防火墙配置手册

华为USG防火墙配置手册1. 简介本手册旨在指导用户进行华为USG防火墙的配置和使用。
华为USG防火墙是一款功能强大的网络安全设备,可用于保护企业网络免受网络攻击和安全威胁。
2. 配置步骤2.1 硬件连接在配置USG防火墙之前,请确保正确连接好相关硬件设备,包括USG防火墙、路由器和服务器等。
2.2 登录USG防火墙使用SSH客户端等工具,输入USG防火墙的IP地址和管理员账号密码进行登录。
2.3 配置基本参数登录USG防火墙后,根据实际需求配置以下基本参数:- 设置管理员密码- 配置IP地址和子网掩码- 设置DNS服务器地址2.4 配置网络地址转换(NAT)根据实际网络环境,配置网络地址转换(NAT)功能。
NAT 功能可以将内部IP地址转换为合法的公网IP地址,实现内网和外网的通信。
2.5 配置访问控制策略配置访问控制策略可以限制网络流量的访问权限,确保只有授权的用户或设备可以访问特定网络资源。
2.6 配置安全服务华为USG防火墙提供多种安全服务功能,例如防病毒、入侵检测和内容过滤等。
根据实际需求,配置相应的安全服务功能。
2.7 配置远程管理和监控配置远程管理和监控功能,可以通过远程管理工具对USG防火墙进行实时监控和管理。
3. 常见问题解答3.1 如何查看防火墙日志?登录USG防火墙的Web界面,找到"日志"选项,可以查看防火墙的各种日志信息,包括安全事件、连接记录等。
3.2 如何升级USG防火墙固件版本?4. 其他注意事项- 在配置USG防火墙之前,请先备份原有的配置文件,以防配置错误或损坏设备。
- 请勿将USG防火墙暴露在不安全的网络环境中,以免受到未授权的访问和攻击。
以上是华为USG防火墙的配置手册,希望能帮助到您。
如有其他问题,请随时联系我们的技术支持。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
华为USG防火墙运维命令大全1查会话使用场合针对可以建会话的报文,可以通过查看会话是否创建以及会话详细信息来确定报文是否正常通过防火墙。
命令介绍(命令类)display firewall session table [ verbose ] { source { inside X.X.X.X | global X.X.X.X } | destination { inside X.X.X.X | global X.X.X.X } } [ source-vpn-instance { STRING<1-19> | public } | dest-vpn-instance { STRING<1-19> | public } ] [ application { gtp | ftp | h323 | http | hwcc | ras | mgcp | dns | pptp | qq | rtsp | ils | smtp | sip | nbt | stun | rpc | sqlnet | mms } ] [ nat ] [ destination-port INTEGER<1-65535> ] [ long-link ]使用方法(工具类)首先确定该五元组是否建会话,对于TCP/UDP/ICMP(ICMP只有echo request和echo reply建会话)/GRE/ESP/AH的报文防火墙会建会话,其它比如SCTP/OSPF/VRRP等报文防火墙不建会话。
如果会话已经建立,并且一直有后续报文命中刷新,基本可以排除防火墙的问题,除非碰到来回路径不一致情况,需要关闭状态检测。
如果没有对应的五元组会话或者对于不建会话的报文,继续后续排查方法。
Global:表示在做NAT时转换后的IP。
Inside:表示在做NAT时转换前的IP。
使用示例<USG5360>display firewall session table verbose source inside10.160.30.214:29:51 2010/07/01Current total sessions :1icmp VPN: public->publicZone: trust -> local TTL: 00:00:20 Left:00:00:20Interface: I0 Nexthop: 127.0.0.1 MAC:00-00-00-00-00-00<-- packets:4462 bytes:374808 --> packets:4461 bytes:37472410.160.30.17:43986<--10.160.30.2:43986对于TCP/UDP/ICMP/GRE/ESP/AH的报文防火墙会建会话,其它比如SCTP/OSPF/VRRP无法使用该方法排查。
2检查接口状态使用场合在报文不通时,可以先检查接口状态,排除由于接口down而导致报文不通的情况。
命令介绍display ip interface brief使用方法查看接口物理层和协议层状态,正常情况下三层接口物理层(Physical)和协议层(Protocol)都是up,如果有down现象,检查网线连接和网线(光纤,光模块)本身是否有问题,更换网线(光纤,光模块)尝试。
使用示例[USG5360]display ip interface brief*down: administratively down(l): loopback(s): spoofingInterface IP Address Physical Protocol DescriptionGigabitEthernet0/0/0 192.168.1.124 up up Huawei, USG5000GigabitEthernet0/0/1 10.160.30.17 up up Huawei, USG5000GigabitEthernet0/0/2 2.1.1.2 up up Huawei, USG5000 GigabitEthernet0/0/3 3.1.1.2 down down Huawei, USG5000 GigabitEthernet1/0/0 unassigned down down Huawei, USG5000GigabitEthernet1/0/1 unassigned up down Huawei, USG5000如上显示,GigabitEthernet0/0/3和GigabitEthernet1/0/0的物理层是down,其中GigabitEthernet0/0/3已经配置了IP地址,而GigabitEthernet1/0/0未配置,物理层down可能是因为网线被拔出或网线出问题,或者是与其对接的接口down,需要检查线路。
GigabitEthernet1/0/1的协议层down是因为没有配置ip地址。
3检查接口统计信息使用场合在发现报文传输有性能下降或者ping有丢包时,可以检查接口统计信息,确认接口是否有丢包。
命令介绍display interface [ interface-type [interface-number] ]使用方法查看出入接口统计是否计数正在增加,如果有增加则说明该接口链路正常,如果只有一条流则可以确定报文是否进入防火墙。
查看接口协商的情况,包括协商速率,全双工/半双工等。
关注接口五分钟流量统计与正常时的差别,关注业务经过设备的两个方向出入接口流量是否差不多。
使用示例GigabitEthernet1/0/0 current state :UPLine protocol current state :UPGigabitEthernet1/0/0 current firewall zone :trustDescription : Huawei, USG5000 Series, GigabitEthernet1/0/0InterfaceThe Maximum Transmit Unit is 1500 bytes, Hold timer is10(sec)Internet Address is11.110.30.17/24IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is0018-82fd-9d3bMedia type is twisted pair, loopback not set, promiscuous mode notset1000Mb/s-speed mode, Full-duplex mode, link type is auto negotiationflow control isdisableOutput queue : (Urgent queue :Size/Length/Discards) 0/50/0Output queue : (Protocol queue : Size/Length/Discards)0/1000/0Output queue : (FIFO queuing :Size/Length/Discards) 0/75/0Last 5 minutes input rate 1083 bytes/sec,11 packets/secLast 5 minutes output rate 1019 bytes/sec,10 packets/secInput: 15901905 packets, 3060644220bytes180 broadcasts, 19745multicasts5920 errors, 0 runts, 0 giants, 0throttles,0 CRC, 0 frames, 5920 overruns, 0 alignerrorsOutput: 10641815 packets, 1764395150bytes200 broadcasts, 0multicasts0 errors, 0 underruns, 0 collisions, 0 latecollisions,0 deferred, 0 lost carrier, 0 no carrier如上显示,Input方向出现了5920个overruns,很有可能之前出现了瞬间很大的流量,导致overruns丢包。
4查看防火墙系统统计使用场合通过查看防火墙系统统计,可以得到各种报文的统计值,以及各种丢包情况等信息。
命令介绍display firewall statistic system使用方法查看当前系统总会话数,TcpSession、UDPSession、ICMP session这三项统计值的和查看TCP半连接数,CurHalfCon统计值就是半连接数,通过该值可以确认半连接数是否过多,是否受到syn-flood攻击查看防火墙转发TCP业务是否丢包,使用RcvTCPpkts、RcvTCPbytes、PassTCPpkts、PassTCPOcts统计值,正常情况下Pass和Rcv不会相差很多会话创建是否失败根据发送报文的类别查看是否存在丢包,从这个统计可以查看出是否存在因攻击防范,包过滤等引起的丢包,以及根据收到ICMP/UDP/TCP报文个数和转发的个数计算被防火墙丢弃的个数。
5查看设备的运行状况使用场合在发现设备的告警灯亮时或者其他如接口无法UP等异常情况时,可以查看设备的运行状况,看主控板、接口卡等是否运行正常。
如果有器件显示故障,需尽快分析。
命令介绍display device使用方法直接执行display device。
使用示例<Eudemon>displaydeviceSecoway USG5360's Devicestatus:Slot# Type Online Status- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 RPU Present Normal2 2GE Present Normal3 PWR(AC) Present Abnormal4 PWR(AC) Present Normal5 FAN Present Normal收藏分享顶踩点评回复报告电梯直达小小李L3发表于 2015-3-27 13:57:30只看该作者沙发6 查看告警信息使用场合在发现设备的告警灯亮时或者在日志中发现如风扇灯硬件相关信息时,可以查看告警信息来确定问题,具体告警的信息参见《USG5300和E200告警.xls》。