- Spokes which have support for Fortinet ADVPN (FortiOS 5.4 or newer),
- Spokes which does not have any support for Fortinet ADVPN (FortiOS 5.2 or earlier, other vendors)
Diagram
· The Hub protects LAN subnet 192.168.1.0/24· The Hub’s overlay IP (i.e., its tunnel IP) is 10.10.10.1· Each Spoke protects a LAN subnet 192.168.x.0/24 where x is the Spoke’s ID (e.g., Spoke-02 protects subnet 192.168.2.0/24)· Each Spoke’s overlay IP is 10.10.10.x where x is the Spoke’s ID (e.g., Spoke-02 overlay IP is 10.10.10.2)
Configuration
IPsecThis section describes:- the IPsec configuration change which must be done on the Hub- the IPsec configuration which must be used on the non-ADVPN-aware FortiGates (FortiOS 5.2 or earlier)The IPsec configuration of the ADVPN-aware Spokes (FortiOS 5.4 or newer) remain identical. No configuration change is needed.See KB article “Technical Note: Fortinet Auto Discovery VPN (ADVPN)”.
BGPThe BGP configuration is unchanged on the Hub.The BGP configuration of non-ADVPN-aware Spokes is identical to the BGP configuration of ADVPN-aware Spokes.See KB article “Technical Note: Fortinet Auto Discovery VPN (ADVPN)”.
The problemAs part of ADVPN a new mechanism was added that allows a Spoke to dynamically advertise its overlay IP address to the Hub during IKE SA negotiation (phase1).On the Hub, this overlay IP is associated to the Spoke’s dialup tunnel.This IP is required for BGP peering.Non-ADVPN-aware Spokes have no such phase1 feature.An alternative way for advertising the overlay IP to the Hub must therefore be used.The solutionSpoke’s protected subnet(s) can be advertised to the Hub during IPsec SA negotiation (quick-mode / phase2).The Hub can be instructed to add a route back to the Spoke for this/these subnet(s). This is called reverse route injection or IKE routes.This mechanism can be used to advertise a Spoke’s overlay IP to its Hub.The solution consists in configuring:· non-ADVPN spokes with an additional phase2 used to advertise their overlay IP during an IPsec SA negotiation (phase2)· the Hub with an additional phase2 used to learn non-ADVPN spokes overlay IP and inject a route back (IKE routes)IPsec configuration change required on the Hub
The phase1 configuration remains identical:config vpn ipsec phase1-interfaceedit "Spoke"set type dynamicset interface "port2"set proposal aes128-sha1set add-route disableset auto-discovery-sender enableset psksecret someSecureSecretKeynextendOnly a new phase2 must be added:
When mixing ADVPN and non-ADVPN Spokes
With ADVPN-only Spokes
config vpn ipsec phase2-interface
edit "Spoke"
set phase1name "Spoke"
set proposal aes128-sha1
next
edit "Overlay_advertisement"
set phase1name "Spoke"
set proposal aes128-sha1
set add-route enable
set comments "Used by legacy Spokes (non-ADVPN aware) to advertise their overlay IP"
set dst-subnet 10.10.10.0 255.255.255.0
next
end
"add-route enable" is for reverse-route injection (IKE routes)
10.10.10.0/24 is the overlay subnet covering the overlay IP addresses of all Spokes.
config vpn ipsec phase2-interface
edit "Spoke"
set phase1name "Spoke"
set proposal aes128-sha1
next
endIt is MANDATORY that the name of the additional phase2 (here, "Overlay_advertisement") be in alphabetic order before the name of the regular phase2 (here, "Spoke").This is because phase2 look up is done in alphabetic order.The configuration of the additional phase2 ("Overlay_advertisement") being more specific than the regular phase2 ("Spoke"), it is therefore mandatory that it be matched first.The phase2 order can be confirmed with:Hub # diag vpn ike config list
vd: root/0name: Spokeserial: 1version: 1status.admin: upstatus.operational: uptype: dynamiclocal: 198.51.100.1mode: maindpd: on-demand retry-count 3 interval 20000msauth: pskdhgrp: 14 5fragmentation: enablexauth: noneinterface: port2virtual-interface-addr: 10.10.10.1 -> 10.10.10.254auto-discovery-sender: enable enableauto-discovery-receiver: disableadd-route: disablephase2s:Overlay_advertisement proto 0 src 0.0.0.0/0.0.0.0:0 dst 10.10.10.0/255.255.255.0:0 dhgrp 14 5 replay add-route route-newSpoke proto 0 src 0.0.0.0/0.0.0.0:0 dst 0.0.0.0/0.0.0.0:0 dhgrp 14 5 replay !add-route route-newpolicy: yes
This is the only extra configuration needed on the Hub should non-ADVPN-aware Spokes need to be part of an ADVPN Hub-and-Spoke architecture.The rest of the configuration is identical to the only-ADVPN-spokes scenario.See KB article “Technical Note: Fortinet Auto Discovery VPN (ADVPN)”.IPsec configuration for non-ADVPN-aware FortiGatesconfig system interfaceedit "Hub"
set vdom "root"
set ip 10.10.10.4 255.255.255.255 // the overlay IP of this Spokeset allowaccess ping
set type tunnelset remote-ip 10.10.10.1 // the overlay IP of the Hubset interface "port2"nextendconfig vpn ipsec phase1-interfaceedit "Hub"set interface "port2"set proposal aes128-sha1set remote-gw 198.51.100.1set psksecret someSecureSecretKeynextendconfig vpn ipsec phase2-interfaceedit "Hub_overlayIP"set comments "For advertising the overlay IP to the Hub"set phase1name "Hub"set proposal aes128-sha1set keepalive enableset auto-negotiate enableset src-addr-type ipset src-start-ip 10.10.10.4 // the overlay IP of this Spokenextedit "Hub_traffic"set comments "For carrying data traffic"set phase1name "Hub"set proposal aes128-sha1set keepalive enableset auto-negotiate enablenextendAgain, it is MANDATORY that the name of the additional phase2 (here, "Hub_overlayIP") be in alphabetic order before the name of the regular phase2 (here, "Hub_traffic")The phase2 order can be confirmed with:Spoke04 # diagnose vpn ike config list
vd: root/0name: Hubserial: 1version: 1type: staticlocal: 0.0.0.0remote: 198.51.100.1mode: maindpd: enable retry-count 3 interval 60000msauth: pskdhgrp: 14 5fragmentation: enablexauth: noneinterface: port2phase2s:Hub_overlayIP proto 0 src 10.10.10.4:0 dst 0.0.0.0/0.0.0.0:0 dhgrp 14 5 replay keep-alive auto-negotiateHub_traffic proto 0 src 0.0.0.0/0.0.0.0:0 dst 0.0.0.0/0.0.0.0:0 dhgrp 14 5 replay keep-alive auto-negotiatepolicy: yes
The BGP configuration is identical to the configuration detailed in KB article “Technical Note: Fortinet Auto Discovery VPN (ADVPN)”.
Related Articles
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2023 Fortinet, Inc. All Rights Reserved.