我需要帮助配置 Fortigate 和瞻博网络设备之间的 VPN 设置(GRE over IPSec)。
我的拓扑如下:
我需要做的是在设备之间创建一个基于路由的 IPSec 隧道,以在其中封装另一个隧道(GRE 隧道)。我在这个 Juniper 和 Cisco 2921 之间有类似的设置,它运行得很好,但是,我在设置这个时遇到了真正的麻烦,因为我没有必要的专业知识。
不知道它是否应该这样工作,但是......
- 我希望 IPSec 隧道在 203.0.113.1 和 203.0.113.2 公共地址之间;
- 我希望 GRE 隧道从环回接口启动并与远程端点的环回(10.255.255.1 和 10.255.255.2)通信,我有通过 IPSec 隧道(相应的 st0.0 和 ipsec 接口)到达的路由;
- 我希望 GRE 接口的 IP 地址分别为 192.168.0.1 和 192.168.0.2(并且在这些接口之间运行 OSPF,不包括配置)。
杜松侧
接口配置:
interface fe-0/0/0 {
unit 0 {
family inet {
address 203.0.113.1/24;
}
}
}
interface lo0 {
unit 0 {
family inet {
address 10.255.255.1/32;
}
}
}
interface st0
unit 0 {
family inet;
}
}
interface gr-0/0/0 {
unit 0 {
clear-dont-fragment-bit;
tunnel {
source 10.255.255.1;
destination 10.255.255.2;
allow-fragmentation;
}
family inet {
mtu 1400;
address 192.168.0.1/30;
}
}
}
IKE 配置(编辑安全 ike):
proposal ike-prop {
authentication-method pre-shared-keys;
dh-group group5;
authentication-algorithm sha1;
encryption-algorithm aes-256-cbc;
lifetime-seconds 28800;
}
policy ike-policy {
mode main;
proposals test-ike-prop;
pre-shared-key ascii-text "test999";
}
gateway ike-gw {
ike-policy test-ike-policy;
address 203.0.113.2;
dead-peer-detection;
nat-keepalive 10;
local-identity inet 203.0.113.1;
remote-identity inet 203.0.113.2;
external-interface fe-0/0/0.0;
version v1-only;
}
IPSec 配置(编辑安全 ipsec):
proposal test-ipsec-prop {
protocol esp;
authentication-algorithm hmac-sha1-96;
encryption-algorithm aes-256-cbc;
lifetime-seconds 3600;
}
policy ipsec-policy {
perfect-forward-secrecy {
keys group5;
}
proposals ipsec-prop;
}
vpn ipsec-vpn {
bind-interface st0.0;
df-bit clear;
ike {
gateway ike-gw;
proxy-identity {
local 10.255.255.1/32;
remote 10.255.255.2/32;
service junos-gre;
}
ipsec-policy ipsec-policy;
}
establish-tunnels immediately;
}
路由配置:
routing-options {
static {
route 10.255.255.2/32 next-hop st0.0;
#Default route exists, but not included
}
}
防火墙配置:
不包括防火墙配置,但允许所有流量如下:
从GRE到IPSec接口
从IPSec到GRE接口
从 Wan1 到 IPSec 接口
从IPSec到Wan1接口
从 Loopback 到 IPSec 接口
从 IPsec 到 Loopback 接口
从 GRE 到受保护的网络
从受保护的网络到 GRE
强边
接口配置:
config system settings
set allow-subnet-overlap enable
end
config system interface
edit "wan1"
set vdom "root"
set ip 203.0.113.2 255.255.255.0
set allowaccess ping
set type physical
set weight 1
set alias "WAN"
next
edit "ipsec"
set vdom "root"
set ip 203.0.113.2 255.255.255.255
set type tunnel
set remote-ip 203.0.113.1
set interface "wan1"
next
edit "gre"
set vdom "root"
set ip 192.168.0.2 255.255.255.255
set allowaccess ping ssh
set type tunnel
set remote-ip 192.168.0.1
set mtu 1400
set interface "ipsec"
next
end
config system gre-tunnel
edit "gre"
set interface "ipsec"
set local-gw 203.0.113.2
set remote-gw 203.0.113.1
next
end
IKE配置:
config vpn ipsec phase1-interface
edit "ike"
set interface "wan1"
set proposal aes256-sha1
set peertype one
set mode aggressive
set localid "203.0.113.2"
set remote-gw 203.0.113.1
set peerid "203.0.113.1"
set psksecret test999
next
end
IPSec配置:
config vpn ipsec phase2-interface
edit "ipsec"
set dst-addr-type ip
set keepalive enable
set phase1name "ike"
set proposal aes256-sha1
set protocol 47
set src-addr-type ip
set dst-start-ip 203.0.113.1
set keylifeseconds 3600
set src-start-ip 203.0.113.2
next
end
路由配置:
config router static
edit 2
set device ipsec
set dst 10.255.255.1 255.255.255.255
next
end
防火墙配置:
不包括防火墙配置,但允许所有流量如下:
从GRE到IPSec接口
从IPSec到GRE接口
从 Wan1 到 IPSec 接口
从IPSec到Wan1接口
从 Loopback 到 IPSec 接口
从 IPsec 到 Loopback 接口
从 GRE 到受保护的网络
从受保护的网络到 GRE
请告知这种设置是否可以正常工作,这里可能有什么问题?我玩过本地/远程身份,可以让 IPSec 出现,显示在安全关联表中,但是,永远无法让 GRE 接口出现并具有可 ping 的远程地址。我也无法通过 IPSec 隧道 ping 远程环回。
如果需要任何调试/输出进行故障排除,只需在评论中发布。谢谢!
也许你有一些很好的资源来设置这个?无法在 Fortinet/Juniper 网站上找到任何有助于在这两个供应商之间进行设置的内容。您绝对可以找到与 Cisco 一起设置的。
注意:使用的地址不是公开的,而是分配给示例代码使用的:https : //www.rfc-editor.org/rfc/rfc5735
