当前位置:网站首页>华为防火墙-5-NAT
华为防火墙-5-NAT
2022-08-11 05:33:00 【macob】
1 源NAT 基本原理
源NAT技术对IP报文的源地址进行转换,将私网IP地址转换成公网IP地址
多条NAT策略之间存在匹配顺序,如果报文命中了某一条NAT策略,就会按照该NAT 策略中引用的地址池来进行地址转换;如果报文没有命中某条 NAT 策略,则会向下继续查找
NAT No-PAT方式也会生成Server-map表,而且生成了正向和反向两条表项。
[FW] display firewall server-map
napt配置
[USG6000V1]nat address-group ag1
nat address-group ag1 0
mode pat
section 0 1.2.3.5 1.2.3.10
exclude-ip 1.2.3.6
[USG6000V1]nat-policy
rule name 10out
description 10,20网段napt
source-zone trust
source-address 10.10.0.0 mask 255.255.255.0
source-address 10.20.0.0 mask 255.255.255.0
action source-nat address-group ag1
安全策略
rule name tr1
source-address 10.10.0.0 mask 255.255.255.0
source-address 10.20.0.0 mask 255.255.255.0
action permit
配置黑洞路由
ip route-static 1.2.3.5 32 NULL 0
ip route-static 1.2.3.7 32 NULL 0
ip route-static 1.2.3.8 32 NULL 0
ip route-static 1.2.3.9 32 NULL 0
ip route-static 1.2.3.10 32 NULL 0
Easy-IP方式无需配置NAT地址池,也不用配置黑洞路由,只需在NAT策略中指定出接口即可
easy IP配置
[USG6000V1]nat-policy
[USG6000V1-policy-nat]rule name 10out
rule name 10out
source-zone trust
source-address 10.10.0.0 mask 255.255.255.0
source-address 10.20.0.0 mask 255.255.255.0
action source-nat easy-ip
2022-07 实际配置:
rule name srcNat
egress-interface GigabitEthernet0/0/8
action source-nat easy-ip
display firewall session table
display firewall session table verbose
display firewall session table source inside 10.10.0.2
display nat address-group name ag1
display nat-policy rule all
display nat-policy rule name 10out
和NAPT一样,Easy-IP方式也不会生成Server-map表。
2 NAT Server
1)将服务器的私网地址10.1.1.2映射成公网地址1.1.1.1
[FW] nat server global 1.1.1.1 inside 10.1.1.2
按照上述配置会将服务器上所有服务项都发布到公网
[USG6000V1]nat server protocol tcp global 1.2.3.6 23 inside 172.16.0.254 23
undo nat server name 0 默认名称0
display nat server
NAT Server配置完成之后,也会生成Server-map表。不过与源NAT生成的Server-map表不同的是,NAT Server 的Server-map 表是静态的,不需要报文来触发,配置了NAT Server后就会自动生成,只有当NAT Server 配置被删除时,对应的Server-map 表项才会被删
[FW] display firewall server-map
2)配置安全策略:
rule name dmz
destination-zone dmz
destination-address 172.16.0.254 mask 255.255.255.255
service telnet
action permit
3)配置黑洞路由
为了避免路由环路,NAT Server 也需要配置黑洞路由。
[FW] ip route-static 1.2.3.6 32 NULL 0
边栏推荐
- Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-30
- SECURITY DAY06 ( iptables firewall, filter table control, extended matching, typical application of nat table)
- CLUSTER DAY02 (Keepalived Hot Standby, Keepalived+LVS, HAProxy Server)
- CLUSTER DAY01 (Introduction to cluster and LVS, LVS-NAT cluster, LVS-DR cluster)
- ETCD集群故障应急恢复-本地数据可用
- 记录一个刚写的Makefile
- vnc远程桌面安装(2021-10-20日亲测可用)
- Slurm基本使用
- Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-27
- 【LeetCode】2034. 股票价格波动(思路+题解)双map
猜你喜欢
随机推荐
升级到Window11体验
CLUSTER DAY01(集群及LVS简介 、 LVS-NAT集群 、 LVS-DR集群)
HPC平台搭建
SECURITY DAY06 ( iptables firewall, filter table control, extended matching, typical application of nat table)
MySQL中忘记用户密码怎么办?
中国移动通信集团有限公司:业务委托书
Solve win10 installed portal v13 / v15 asked repeatedly to restart problem.
【LeetCode】1036. 逃离大迷宫(思路+题解)压缩矩阵+BFS
MoreFileRename批量文件改名工具
arcmap下的多进程脚本
(二)软件测试理论(*重点用例方法编写)
vulnhub靶机--6Day_Lab-v1.0.1
无胁科技-TVD每日漏洞情报-2022-8-6
(三)软件测试理论(了解软件的缺陷知识)
树莓派设置静态IP地址
(3) Software testing theory (understanding the knowledge of software defects)
MySQl进阶之索引结构
无胁科技-TVD每日漏洞情报-2022-7-29
CLUSTER DAY02( Keepalived热备 、 Keepalived+LVS 、 HAProxy服务器 )
pytorch下tensorboard可视化深坑









