Technical Tip: Dynamic routing (BGP) over IPsec tunnel
Description
Solution
The CLI guide states: to use dynamic routing with the tunnel or be able to ping the tunnel interface, specify an address for the remote end of the tunnel in remote-ip and an address for this end of the tunnel in IP. This is only available if the type is tunnel.
Bear in mind that these settings are for tunnels with static IP addresses.
This document will be updated at a later date for the dial-up tunnel.
Extracts of CLI Configuration settings for the left FortiGate (Firewall rules not shown here).
edit "port13"
set vdom "External"
set ip 10.115.2.97 255.255.240.0
set type physical
next
edit "Tunnel1"
set vdom "External"
set ip 11.11.11.97 255.255.255.255 <-- Use whatever IP is required.
set type tunnel
set remote-ip 11.11.11.130 <-- Use whatever IP is required.
set interface "port13"
edit "Tunnel1"
set interface "port13"
set nattraversal disable
set remote-gw 10.115.1.130
set psksecret ENC LCVkCiK2E2PhVUzZe
next
end
config vpn ipsec phase2-interface
edit "Tunnel1-P2"
set phase1name "Tunnel1"
set keepalive enable
set auto-negotiate enable
end
set as 65002
set router-id 192.168.1.97
config neighbor
edit "11.11.11.130"
set remote-as 65003
end
Extracts of CLI Configuration settings for the right FortiGate:
edit "port2"
set vdom "root"
set ip 10.115.1.130 255.255.240.0
set allowaccess ping https ssh http telnet
set type physical
set snmp-index 2
next
edit "Tunnel1"
set vdom "root"
set ip 11.11.11.130 255.255.255.255 <-- Use whatever IP is required.
set type tunnel
set remote-ip 11.11.11.97 <-- Use whatever IP is required.
set interface "port2"
edit "Tunnel1"
set interface "port2"
set remote-gw 10.115.2.97
set psksecret ENC LCVkCiK2E2PhVUzZe
next
end
config vpn ipsec phase2-interface
edit "Tunnel1-P2"
set phase1name "Tunnel1"
set auto-negotiate enable
end
set as 65003
set router-id 192.168.1.130
config neighbor
edit "11.11.11.97"
set remote-as 65002
end
edit 3
set srcintf "Tunnel1"
set dstintf "port3"
set action accept
set service "ALL"
next
edit 4
set srcintf "port3"
set dstintf "Tunnel1"
set action accept
set service "ALL"
Verification of BGP sessions:
BGP neighbor is 11.11.11.130, remote AS 65003, local AS 65002, external link
BGP version 4, remote router ID 192.168.1.130
BGP state = Established, up for 00:09:44
.
Connections established 1; dropped 0
Local host: 11.11.11.97, Local port: 179
Foreign host: 11.11.11.130, Foreign port: 1375
Nexthop: 11.11.11.97
BGP neighbor is 11.11.11.97, remote AS 65002, local AS 65003, external link
BGP version 4, remote router ID 192.168.1.2
BGP state = Established, up for 00:08:16
.
Connections established 1; dropped 0
Local host: 11.11.11.130, Local port: 1375
Foreign host: 11.11.11.97, Foreign port: 179
Nexthop: 11.11.11.130:
In the above configuration for both FortiGates, the IPsec phase 2 proxy or selector settings are 0.0.0.0; as such, all subnet traffic will be allowed through the tunnel.
For the left FortiGate:
For the right FortiGate:
Troubleshooting Tip: Troubleshooting IPsec Site-to-Site Tunnel Connectivity
Technical Tip: How to configure VPN Site to Site between FortiGates (Using VPN Setup Wizard)
Troubleshooting Tip: IPsec VPNs tunnels
Technical Tip: Setting multiple DNS server for IPSec dial-up VPN
Technical Tip: NAT-traversal comparison between site-to-site and dial-up” dynamic” tunnels
Technical Tip: FortiGate Hub with multiple IPSec Dial-up phase1 using IKEv2 and PSK authentication
Technical Tip: How to configure multiple VPN tunnels from the same ISP to the same remote peer ISP.
Technical Tip: IPsec dial-up full tunnel with FortiClient
Technical Tip: Differences between Aggressive and Main mode in IPSec VPN configurations
Technical Tip: OSPF with IPSec VPN for network redundancy
Technical Tip: Dynamic dial-up VPN with OSPF
Technical Tip: Fortinet Auto Discovery VPN (ADVPN)
Technical Tip: 'set net-device' new route-based IPsec logic
Technical Tip: Simple OCVPN deployment
Technical Tip: SD-WAN integration with OCVPN
Technical Tip: Configure IPsec VPN with SD-WAN
Technical Tip: SD-WAN with DDNS type IPsec
Technical Tip: SD-WAN primary and backup IPsec tunnel Scenario
Troubleshooting Tip: IPsec VPN Phase 1 Process - Aggressive Mode
Technical Tip: How to configure IPsec VPN Tunnel using IKE v2
Technical Tip: Hard timeout for Dialup IPsec VPN Tunnel
Troubleshooting Tip: Troubleshooting BGP over IPsec
