如何利用NAT技术隐藏GRE报文中的源地址信息?

组网及说明
注:如无特别说明,描述中的 fw1 或 msr1 对应拓扑中设备名称末尾数字为 1 的设备,fw2 或 msr2 对应拓扑中设备名称末尾数字为 2 的设备,以此类推;另外,同一网段中,ip 地址的主机位为其设备编号,如 fw1 的 g0/0 接口若在 192.168.1.0/24 网段,则其 ip 地址为 192.168.1.1/24,以此类推。
实验需求
由于gre报文为明文封装,在网络中传输容易被监听导致信息泄漏。基于此,本案例提供一种方案,使用nat技术隐藏客户端源地址。
配置步骤
fw1
# nat static inbound 192.168.13.3 1.1.1.1 acl 3000 reversible#interface loopback0 ip address 192.168.12.1 255.255.255.255#interface gigabitethernet1/0/0 port link-mode route combo enable copper ip address 192.168.1.1 255.255.255.0 nat outbound#interface gigabitethernet1/0/1 port link-mode route combo enable copper ip address 192.168.13.1 255.255.255.0 nat static enable#interface tunnel0 mode gre ip address 10.1.1.1 255.255.255.0 source 192.168.12.1 destination 192.168.12.2#security-zone name local#security-zone name trust import interface gigabitethernet1/0/1#security-zone name dmz#security-zone name untrust import interface gigabitethernet1/0/0 import interface tunnel0#security-zone name management# ip route-static 1.1.1.1 32 192.168.13.3 ip route-static 1.1.1.2 32 tunnel0 ip route-static 192.168.12.2 32 192.168.1.2 ip route-static 192.168.24.4 32 tunnel0#acl advanced 3000 rule 5 permit ip source 192.168.13.3 0 destination 1.1.1.2 0# session statistics enable#              ip http enable ip https enable#security-policy ip rule 0 name any  action pass  
fw2
# nat static inbound 192.168.24.4 1.1.1.2 acl 3000 reversible#interface loopback0 ip address 192.168.12.2 255.255.255.255#interface gigabitethernet1/0/0 port link-mode route combo enable copper ip address 192.168.1.2 255.255.255.0 nat outbound#interface gigabitethernet1/0/1 port link-mode route combo enable copper ip address 192.168.24.2 255.255.255.0 nat static enable#interface tunnel0 mode gre ip address 10.1.1.2 255.255.255.0 source 192.168.12.2 destination 192.168.12.1#security-zone name local#security-zone name trust import interface gigabitethernet1/0/1#security-zone name dmz#security-zone name untrust import interface gigabitethernet1/0/0 import interface tunnel0#security-zone name management# ip route-static 1.1.1.1 32 tunnel0 ip route-static 1.1.1.2 32 192.168.24.4 ip route-static 192.168.12.1 32 192.168.1.1 ip route-static 192.168.13.3 32 tunnel0#acl advanced 3000 rule 5 permit ip source 192.168.24.4 0 destination 1.1.1.1 0# session statistics enable#              ip http enable ip https enable#security-policy ip rule 0 name any  action pass  
配置关键点
注意事项:需要注意添加对应的静态路由
以r3访问r4为例,访问过程如下:
fw1上的业务点
nat转换:
192.168.13.3:10965 -         1.1.1.2: 2048(vpn:    0) ------>         1.1.1.1:10965 -         1.1.1.2: 2048(vpn:    0)  
gre封装:
192.168.12.1  -           192.168.12.2  
w2上的业务点
gre解封装:
192.168.12.1  -           192.168.12.2  
nat转换:
1.1.1.1:10965 -         1.1.1.2: 2048(vpn:    0) ------>1.1.1.1:10965 -    192.168.24.4: 2048(vpn:    0)


苹果将在2021年春季推出非5G iPhone 12
车灯即将成为汽车智能化的新入口
一分钟带你了解:史上最大比特币区块之谜
数字化转型新篇章:华为云耀云服务器 L 实例引领初创与成长型企业向前
五大运营商将联合打造5G时代,将迎来新的变革
如何利用NAT技术隐藏GRE报文中的源地址信息?
在信号链设计器中开启设计项目的方法介绍
R与SPSS、SAS相比较_Python 在数据分析工作中的地位与R语言、SAS、SPSS 比较如何?
无人驾驶最终赢家可能不是Waymo,而是特斯拉
什么是80 PLUS认证? 电源80 plus认证有什么用?
解析如何给稳压器构建监控和控制提供解决方案
Raspberry pico处理器的移植SMP教程
防爆燃气流量计的应用场合及产品优势
美芯晟推出2A, 24V降压DC-DC转换器MT8102
必达安保系统i1A8FK-AN2门锁简介
一家医疗保健AI初创公司推出了一款软件
Go汇编基础知识
电子镇流器式荧光灯电路图-原理图
吉利科技集团新能源电池研究院项目签约仪式在浙江嘉兴秀洲区举行
激光焊接有哪些优势和劣势