华为防火墙基本原理工作方法总结

防火墙只会对tcp首包syn建立会话表,其它丢掉,如syn+ack,ack

udp直接建立会话表

icmp只对首包请求包建立会话表,其它包,如应答的不会建立直接丢掉

防火墙状态查看:

rule name trust_untrust

source-zone trust

destination-zone untrust

action permit

dis firewall session table verbose

查看详细会话情况

192.168.0.139已把包送到172.16.0.100,但172.16.0.100回不了包。

<--packets: 0bytes: 0 --> packets: 1bytes: 60

dis policy interzone trust untrust outbound

查看策略命中统计

firewall interzone trust untrust

detect ftp

开启ftp或qq或msn的aspf功能

当防火墙开启aspf功能后,会话会产生server-map表项(nat server、no-pat时也会产生server-map)

dis firewall server-map

查看会话表项

自定义aspf项

acl number 3000

rule 5 permit ip source 192.168.0.1 0 destnation 172.16.0.100 0

firewall interzone trust untrust

detect user-defined 3000 outbound

display interzone 查看域外是否开启了aspf

dis zone 查看域内是否开启了aspf

防火墙会默认阻挡单播报文,不会阻挡组播报文,所以ospf p2p网络不用配置策略。

dis firewall statistic system discard

查看丢包情况

undo firewall session link-state check

关闭状态检测功能,变成包过滤防火墙

TTl 本条信息的老化时间

loft 本条信息剩余老化时间

mac 目标mac地址

会话表的老化时间设备

firewall session aging-time service-set icmp 1000

类似于sql语句需要长连接的业务,需要单独设置长连接,华为只支持tcp类型长连接

默认长连接会话时间是168小时。

rule name trust_untrust

source-zone trust

destination-zone untrust

long-link enable //开长连接

action permit

防火墙有两条ISP线路时,负载均衡时,要把不同的ISP加入两个不同的zone,设两条napt策略,两条安全策略,两个地址池。如果都放到一个zone时,就不会负载了,只会按NAT策略的顺序执行最上面的那条isp策略。

如果把两条公网放在一个zone了,现在又要做nat server就用下面第二种方法:

nat server向外发服务器地址时可以在命令后加上no-reverse,映射两个公网上

USG6000V1\]nat server protocol tcp global 1.1.1.1 80 inside 192.168.0.1 80 no-re verse \[USG6000V1\]nat server protocol tcp global 1.1.1.2 80 inside 192.168.0.1 80 no-re verse dis firewall server-map 查看 firewall endpoint-independent filter enable 用于开启只根据server-map表转发,不受策略的控制,华为默认这个配置是开的。 双线,对外nat server时,要配置源进源出,两条外线接口上都要配置: gateway 1.1.1.254 //是对端公网网关下一跳地址 redirect-rroute enable 不同版本命令不同: redirect-reverse nexthop 1.1.1.254 ### 防火墙在使用时的正确思路是: 第一步:先把默认策略打开全部放行 security-policy default active permit 第二步:把正常的业务都配通,然后进行ping测试或业务连接测试。 第三步:用命令看数据zone的走向:dis firewall session table verbose 第四步:把看到数据走向的哪个区域到哪个区域都记下来,数据的来回正向和反向都要考虑到 第五步:按记下的数据zone走向起安全策略,哪个zone到哪个zone,包括数据来回正向和反向策略都要考虑在内。 第六步:关掉第一步的全部放行,改成默认全部拒绝,最后测试业务是否正常。 security-policy default active deny

相关推荐
小生不才yz5 分钟前
【Makefile 专家之路 | 函数篇】11. 终极奥义:eval 函数——动态生成规则的“核武器”
linux
皮卡蛋炒饭.10 分钟前
进程得控制
linux·运维·服务器
YMWM_24 分钟前
Install pyrealsense2 on the jetson thor
linux·realsense2
weiwx8335 分钟前
Nginx location 和 proxy_pass 配置详解
服务器·网络·nginx
BestOrNothing_20151 小时前
(3)Ubuntu 22.04 双系统安装全过程记录
linux·ubuntu22.04·双系统安装
西门吹-禅1 小时前
【sap fiori cds up error】
java·服务器·sap cap cds
寂柒3 小时前
Linux——基础IO
linux
杨云龙UP3 小时前
Oracle ASM磁盘组空间分配与冗余理解
linux·运维·数据库·sql·oracle
朽棘不雕3 小时前
Linux权限
linux
minji...3 小时前
Linux 库制作与原理(三)深入动静态链接原理
linux·运维·服务器·c++