目录
一、组网需求
如图所示,通过VPN将2个局域网连接起来,实现192.168.0.0/24与192.168.1.0/24两个网段的通信
二、网络拓扑
三、配置要点
1、配置NGFW1
1)基本上网配置
2)配置GRE通道
3)配置接口
4)配置路由
5)配置策略
2、配置NGFW2
1)基本上网配置
2)配置GRE通道
3)配置接口
4)配置路由
5)配置策略
四、配置步骤
1、配置NGFW1
1)基本上网配置
配置详细过程请参照 “路由模式典型功能--单线上网--静态地址线路上网配置“一节:
接口IP配置如下:
路由配置如下
2)配置GRE通道 (仅CLI)
RG-WALL # config system gre-tunnel
RG-WALL (gre-tunnel) # edit gre
new entry 'gre' added
RG-WALL (gre) # set interface wan1
RG-WALL (gre) # set remote-gw 200.1.1.2
RG-WALL (gre) # set local-gw 100.1.1.2
RG-WALL (gre) # end
3)配置接口
通道配置后,会在接口内显示GRE虚拟接口。
RG-WALL # config system interface
RG-WALL (interface)#edit gre
new entry 'gre' added
RG-WALL (gre) #set vdom root
RG-WALL (gre) #set ip 1.1.1.1 255.255.255.255 (可选,一般不需要配置IP地址)
RG-WALL (gre) #set type tunnel
RG-WALL (gre) #set remote-ip 1.1.1.2
RG-WALL (gre) #set snmp-index 8
RG-WALL (gre) #set interface wan1
RG-WALL (gre) #set mtu-override enable
RG-WALL (gre) #set mtu 1476 //建议修改
RG-WALL (gre) #next
RG-WALL (interface)#end
4)配置路由
菜单:路由--静态--静态路由,点击“新建”
目的IP/子网掩码: 对方防火墙所保护的子网,192.168.1.0 ,
设备: 配置VPN所生成的接口,选择gre。
5)配置策略
菜单: 防火墙--策略--策略, 点击 “新建”
按如下方式创建两条策略,通过该策略对两端2个子网之间的访问进行控制,NAT,UTM防护等,
第1条策略: 允许本地的192.168.0.0网段,访问对端的192.168.1.0网段
第2条策略: 允许对端的192.168.1.0网段,访问本端的192.168.0.0网段
2、配置NGFW2
1)基本上网配置
配置详细过程请参照 “路由模式典型功能--单线上网--静态地址线路上网配置“一节:
接口IP配置如下:
路由配置如下:
2) 配置GRE通道
RG-WALL # config system gre-tunnel
RG-WALL (gre-tunnel) # edit gre
new entry 'gre' added
RG-WALL (gre) # set interface wan1
RG-WALL (gre) #set remote-gw 100.1.1.2
RG-WALL (gre) #set local-gw 200.1.1.2
RG-WALL (gre) #next
3)配置接口
通道配置后,会在接口内显示GRE虚拟接口。
RG-WALL # config system interface
RG-WALL (interface) # edit gre
new entry 'gre' added
RG-WALL (gre) #set vdom root
RG-WALL (gre) #set ip 1.1.1.2 255.255.255.255 (可选,一般不需要配置IP)
RG-WALL (gre) #set type tunnel
RG-WALL (gre) #set remote-ip 1.1.1.1
RG-WALL (gre) #set snmp-index 8
RG-WALL (gre) #set interface wan1
RG-WALL (gre) #set mtu-override enable
RG-WALL (gre) #set mtu 1476 //建议修改
RG-WALL (gre) #next
RG-WALL (interface)#end
4)配置路由
菜单:路由--静态--静态路由,点击“新建”
目的IP/子网掩码: 对方防火墙所保护的子网,192.168.0.0 ,
设备: 配置VPN所生成的接口,选择gre。
5)配置策略
菜单: 防火墙--策略--策略, 点击 “新建”
按如下方式创建两条策略,通过该策略对两端2个子网之间的访问进行控制,NAT,UTM防护等,
第1条策略: 允许本地的192.168.1.0网段,访问对端的192.168.0.0网段
第2条策略: 允许对端的192.168.0.0网段,访问本端的192.168.1.0网段
五、检查配置结果
两个网络采用 ping测试方式,192.168.1.0/24和192.168.0.0/24两个内网可以相互访问。