Quick Note 20. Configuring a GRE tunnel over an IPSec tunnel and using BGP to propagate routing information. (GRE over IPSec with BGP)



Similar documents
Quick Note 53. Ethernet to W-WAN failover with logical Ethernet interface.

Quick Note 038. Upgrade Software options and/or VPN Licenses on a Digi Transport router.

Quick Note 041. Digi TransPort to Digi TransPort VPN Tunnel using OpenSSL certificates.

Using IPsec VPN to provide communication between offices

Setting up D-Link VPN Client to VPN Routers

Configure VPN between ProSafe VPN Client Software and FVG318

Configuring a VPN for Dynamic IP Address Connections

Configuring IPsec VPN with a FortiGate and a Cisco ASA

Quick Note 051. Common Passwords/ID errors in IPsec VPN negotiation for TransPort routers. DRAFT July 2015

DFL-210/260, DFL-800/860, DFL-1600/2500 How to setup IPSec VPN connection

Netgear ProSafe VPN firewall (FVS318 or FVM318) to Cisco PIX firewall

Quick Note 026. Using the firewall of a Digi TransPort to redirect HTTP Traffic to a proxy server. Digi International Technical Support December 2011

How To Industrial Networking

Understanding Virtual Router and Virtual Systems

BGP (Border Gateway Protocol)

Configuring IPSec VPN Tunnel between NetScreen Remote Client and RN300

CREATING AN IKE IPSEC TUNNEL BETWEEN AN INTERNET SECURITY ROUTER AND A WINDOWS 2000/XP PC

Lab 4.4.8a Configure a Cisco GRE over IPSec Tunnel using SDM

Windows XP VPN Client Example

PowerLink Bandwidth Aggregation Redundant WAN Link and VPN Fail-Over Solutions

Protecting the Home Network (Firewall)

VPN Configuration of ProSafe VPN Lite software and NETGEAR ProSafe Router:

WAN Failover Scenarios Using Digi Wireless WAN Routers

Network/VPN Overlap How-To with SonicOS 2.0 Enhanced Updated 9/26/03 SonicWALL,Inc.

Chapter 6 Configuring the SSL VPN Tunnel Client and Port Forwarding

Configuring SSH Sentinel VPN client and D-Link DFL-500 Firewall

Chapter 6 Virtual Private Networking

Based on the VoIP Example 1(Basic Configuration and Registration), we will introduce how to dial the VoIP call through an encrypted VPN tunnel.

Application Note. Failover through BGP route health injection

Configuring Dual VPNs with Dual ISP Links Using ECMP Tech Note PAN-OS 7.0

Prestige 310. Cable/xDSL Modem Sharing Router. User's Guide Supplement

How to setup PPTP VPN connection with DI-804HV or DI-808HV using Windows PPTP client

Configure ISDN Backup and VPN Connection

IPSec Pass through via Gateway to Gateway VPN Connection

Appendix A: Configuring Firewalls for a VPN Server Running Windows Server 2003

Note: This case study utilizes Packet Tracer. Please see the Chapter 5 Packet Tracer file located in Supplemental Materials.

Configuring a FortiGate unit as an L2TP/IPsec server

Chapter 9 Monitoring System Performance

UTM - VPN: Configuring a Site to Site VPN Policy using Main Mode (Static IP address on both sites) i...

Setting up VPN connection: DI-824VUP+ with Windows PPTP client

FSM73xx GSM73xx GMS72xxR Shared access to the Internet across Multiple routing VLANs using a Prosafe Firewall

VPN Consortium Scenario 1: Gateway-to-Gateway with Preshared Secrets

Configuration Guide. How to set up the IPSec site-to-site Tunnel between the D-Link DSR Router and the Cisco Firewall. Overview

VPN Consortium Scenario 1: Gateway-to-Gateway with Preshared Secrets

How To Set Up A Netvanta For A Pc Or Ipad (Netvanta) With A Network Card (Netvina) With An Ipa (Net Vanta) And A Ppl (Netvi) (Netva)

Quick Note 040. Create an SSL Tunnel with Certificates on a Digi TransPort WR router using Protocol Switch.

VPN Configuration of ProSafe Client and Netgear ProSafe Router:

How To Configure Syslog over VPN

Prestige 202H Plus. Quick Start Guide. ISDN Internet Access Router. Version /2004

Workflow Guide. Establish Site-to-Site VPN Connection using RSA Keys. For Customers with Sophos Firewall Document Date: November 2015

Micronet SP881. TheGreenBow IPSec VPN Client Configuration Guide.

Planet CS TheGreenBow IPSec VPN Client. Configuration Guide.

Application Note 53. Configure a Digi TransPort Router to use DMNR (Dynamic Mobile Network Routing)

This is a guide on how to create an IPsec VPN tunnel from a local client running Shrew Soft VPN Client to an Opengear device.

How To Configure An Ipsec Tunnel On A Network With A Network Gateways (Dfl-800) On A Pnet 2.5V2.5 (Dlf-600) On An Ipse Vpn

Using Remote Desktop Software with the LAN-Cell

APNIC elearning: BGP Basics. Contact: erou03_v1.0

ZyXEL ZyWALL P1 firmware V3.64

TechNote. Configuring SonicOS for Amazon VPC

ZyWALL 5. Internet Security Appliance. Quick Start Guide Version 3.62 (XD.0) May 2004

Evaluation guide. Vyatta Quick Evaluation Guide

How To - Setup Cyberoam VPN Client to connect to a Cyberoam for the remote access using preshared key

Configuring Static IP for your Pace Devices

Establishing a VPN tunnel to CNet CWR-854 VPN router using WinXP IPSec client

OvisLink 8000VPN VPN Guide WL/IP-8000VPN. Version 0.6

Creating a VPN with overlapping subnets

1 PC to WX64 direction connection with crossover cable or hub/switch

This techno knowledge paper can help you if: You need to setup a WAN connection between a Patton Router and a NetGuardian.

How to access peers with different VPN through IPSec. Tunnel

Configuring IP Load Sharing in AOS Quick Configuration Guide

IP Office Technical Tip

How To Configure SSL VPN in Cyberoam

Quick Note 32. Using Digi RealPort with a Digi TransPort Router. UK Support September 2012

Configure an IPSec Tunnel between a Firebox Vclass & a Check Point FireWall-1

Configuring TheGreenBow VPN Client with a TP-LINK VPN Router

Gateway to Gateway VPN Connection

Chapter 4 Virtual Private Networking

Document No. FO1001 Issue Date: Draft: Work Group: FibreOP Technical Team October 1, 2013 Final:

Firewall Troubleshooting

Configuring a BANDIT Product for Virtual Private Networks

LevelOne. User Manual. FBR-1430 VPN Broadband Router, 1W 4L V1.0

STONEGATE IPSEC VPN 5.1 VPN CONSORTIUM INTEROPERABILITY PROFILE

Deploying the Barracuda Link Balancer with Cisco ASA VPN Tunnels

PPTP Server Access Through The

Operating System for Ubiquiti EdgeRouters Release Version: 1.4

VPN Tracker for Mac OS X

Setting up VPN Access for Remote Diagnostics Support

Chapter 4 Customizing Your Network Settings

How To Set Up Bgg On A Network With A Network On A Pb Or Pb On A Pc Or Ipa On A Bg On Pc Or Pv On A Ipa (Netb) On A Router On A 2

Cisco Certified Network Associate Exam. Operation of IP Data Networks. LAN Switching Technologies. IP addressing (IPv4 / IPv6)

VPN SECURITY POLICIES

Configuration Guide. How to Configure SSL VPN Features in DSR Series. Overview

VPN Configuration Guide LANCOM

Setup Reference guide for PBX to SBC interconnection

How To Setup Cyberoam VPN Client to connect a Cyberoam for remote access using preshared key

Chapter 5 Virtual Private Networking Using IPsec

How To Establish Site-to-Site VPN Connection. using Preshared Key. Applicable Version: onwards. Overview. Scenario. Site A Configuration

Digi Connect WAN Application Helper NAT, GRE, ESP and TCP/UPD Forwarding and IP Filtering

IPsec VPN Application Guide REV:

Accessing Remote Devices via the LAN-Cell 2

Transcription:

Quick Note 20 Configuring a GRE tunnel over an IPSec tunnel and using BGP to propagate routing information. (GRE over IPSec with BGP) Appendix A GRE over IPSec with Static routes UK Support August 2012 1

Contents 1 Introduction... 3 1.1 Outline... 3 1.2 Assumptions... 3 1.3 Corrections... 3 2 Scenario... 4 3 Configure IPSec VPN... 5 3.1 Configure IKE... 5 3.2 Configure IPSec... 6 3.3 Configure Pre-Shared Key... 8 4 Configure GRE tunnels... 9 5 Configuring BGP... 10 5.1 Create the bgp.conf text files... 11 5.2 Enable BGP... 11 5.3 Save your config changes to profile 0... 12 6 Testing... 13 6.1 Check the routing tables... 13 6.2 Test connectivity... 14 7 Scaling up - Adding more sites... 15 8 Basic troubleshooting... 16 9 Appendix A... 17 9.1 Using Static routes instead of a dynamic routing protocol... 17 9.1.1 Check the GRE tunnel status... 17 9.1.2 Configure Static Routes... 18 9.1.3 Save your config changes to profile 0... 18 9.1.4 Check the routing tables... 18 9.1.5 Test connectivity... 20 2

1 INTRODUCTION 1.1 Outline This document describes how to configure a GRE tunnel within an IPSec tunnel to secure communications between routers. The GRE tunnel proveds a point-to-point link between the routers that can be used by BGP as well as transferring regular data. If BGP is not used, the same initial setup is still valid but static routes can be configured instead. See Section 9. 1.2 Assumptions This guide has been written for technically competent personnel who are able to configure a standard IPSec tunnel between 2 Sarian routers and are familiar with the use of routing protocols. Configuration: This guide assumes that the routers have been configured already with internet access. This application note applies to; Models shown: Central HQ router, Digi Transport DR64 router with ADSL. Remote site router, WR44 with a cellular link running. Both routers are running firmware version 5081. Other Compatible Models: All Digi Transport products. Firmware versions: 4905 or later. 1.3 Corrections Requests for corrections or amendments to this application note are welcome and should be addressed to: uksupport@digi.com Requests for new application notes can be sent to the same address. Version Number Status 1.0 Published 2.0 Re-written and updated 2.1 Update for new GUI 3

2 SCENARIO An IPSec tunnel is setup to ensure secure communications between the Central HQ and the Remote site. A GRE tunnel is configured to run through the IPSec tunnel to allow point to point communication between the 2 sites. This is used when a process such as a routing protocol needs point to point communication between 2 sites and a point to point link such as leased line is not available. Both routers have been configured with internet connectivity, the Central HQ router uses ADSL with a dynamic public IP address but uses the DynDNS service so it can always be reached at router.dyndns.org; the Remote site router has a cellular link and is allocated a private IP address by the mobile operator. LAN segments are attached on Eth0. 4

3 CONFIGURE IPSEC VPN 3.1 Configure IKE Configuration - VPN > IPSec > IKE > IKE 0 / Responder Responder Central site IKE 0 Remote site The IKE configuration is default on both routers except for enabling aggressive mode on the Remote site IPSec initiator. 5

3.2 Configure IPSec Configuration - VPN > IPSec > IPSec Eroutes > Eroute 0-9 > Eroute 0 Central HQ (IPSec responder) 6

Configuration - VPN > IPSec > IPSec Eroutes > Eroute 0-9 > Eroute 0 Remote site (Initiator) This Eroute config is exactly the same as a regular IPSec tunnel except for the following fields: Local subnet IP address, Local subnet mask, Remote subnet IP address, Remote subnet mask These fields are configured with a host IP address that does not actually exist (use an unused IP address from an unused subnet, it doesn t matter what is used). These are the end points of the IPSec tunnel. In this example 172.16.0.1 is used on the Central HQ router and 172.16.0.2 is used on the Remote site router, both with the subnet mask 255.255.255.255 7

3.3 Configure Pre-Shared Key Configuration - Security > Users > User 10-19 > User 10 Central HQ (IPSec responder) Remote site (Initiator) The pre-shared key is configured as shown, the name is the ID that the other router sends as its Our ID from the eroute parameters. The Password needs to match on both routers as this is the shared key. The Access level should be none, as this user does not need access to the router administration interfaces. 8

4 CONFIGURE GRE TUNNELS Configuration - Interfaces > GRE > Tunnel 0-9 > Tunnel 0 Central HQ (IPSec responder) Remote site (Initiator) The GRE tunnel is configured as a point to point connection using the 192.168.0.0/30 subnet. Note the usage of the previously configured addresses 172.16.0.1 and 172.16.0.2 from within the Eroute settings, these are the source and destination IP addresses of the IPSec tunnel that GRE will tunnel through. If you intend to use static routes and not BGP, skip to Section 9. 9

5 CONFIGURING BGP Each router will need a bgp.conf file creating, this is a plain text file created using notepad. The file contains the parameters that BGP will use. The #macros section does not need to be used but can contain be used to define parameters such as hello intervals that will be used across all sites. The #global configuration section is where the main BGP configuration is defined. An example bgp.conf file contains: AS numbers The AS numbers should be configured in the private AS range 64512-65535. If the local and remote AS is the same then IBGP is inferred and when scaling up routes will only be exchanged between directly connected neighbours. If the local and remote AS are different then EBGP is inferred and when scaling up routes will be exchanged between directly connected neighbours and all other neighbours connected to the central router. Neighbor The IP address defined in the statement neighbor 192.168.0.2 is the IP address assigned to the remote end point of the GRE tunnel. Important The blank line at the end of the bgp.conf, after the final } IS required, otherwise BGP will not start. Be aware of the American spelling of neighbor. The options for the bgp.conf file are explained fully at the following web site: http://www.openbsd.org/cgi-bin/man.cgi?query=bgpd.conf 10

5.1 Create the bgp.conf text files Using notepad create a file with the following contents for each router. The files can be named anything you like, but we recommend something like bgp.conf so it is obvious what the file is. In this example, the files are named bgpc.conf for the central router & bgpr.conf for the remote router. Central HQ (IPSec responder) bgpc.conf #macros #global configuration AS 65001 router-id 172.30.0.1 holdtime 180 holdtime min 3 log updates network 172.30.0.0/24 neighbor 192.168.0.2{ remote-as 65002 announce all depend on tun0 } [blank line] Remote site (Initiator) bgpr.conf #macros #global configuration AS 65002 router-id 172.30.1.1 holdtime 180 holdtime min 3 log updates network 172.30.1.0/24 neighbor 192.168.0.1{ remote-as 65001 announce all depend on tun0 } [blank line] These bgp configuration text files need to be FTP uploaded onto the respective routers. 5.2 Enable BGP Configuration - Routing > BGP Central HQ (IPSec responder) & Remote site (Initiator) Enable BGP, set to Yes Select the file bgp.conf from the drop down list Make sure the 2 following restart options are ticked 11

5.3 Save your config changes to profile 0 Administration - Save configuration 12

6 TESTING 6.1 Check the routing tables Execute a command route print Central HQ (IPSec responder) route print Destination Gateway Metric Protocol Idx Interface Status ------------------------------------------------------------------------------ 10.1.0.0/16 10.1.51.2 1 Local - ETH 0 UP 95.154.209.28/32 217.34.133.29 2 Static 0 ETH 3 UP 172.30.0.0/24 172.30.0.1 1 Local - ETH 1 UP 172.30.1.0/24 192.168.0.2 20 EBGP - TUN 0 UP 192.168.0.0/30 192.168.0.1 1 Local - TUN 0 UP 217.34.133.16/28 217.34.133.21 1 Local - ETH 3 UP OK 0.0.0.0/0 217.34.133.29 2 Static 3 ETH 3 UP Remote site (Initiator) route print Destination Gateway Metric Protocol Idx Interface Status ------------------------------------------------------------------------------ 10.1.0.0/16 10.1.51.4 1 Local - ETH 0 UP 172.30.0.0/24 192.168.0.1 0 EBGP - TUN 0 UP 172.30.1.0/24 172.30.1.1 1 Local - ETH 1 UP 192.168.0.0/30 192.168.0.2 1 Local - TUN 0 UP 0.0.0.0/0 10.1.2.100 1 Static 0 ETH 0 UP OK Viewing the routing table shows: The local LAN segment and the interface it is configured on. The GRE tunnel /30 subnet. The gateway address is the remote GRE IP address. The remote LAN subnet. This will be routed to via TUN 0, its gateway will be the remote IP address of the GRE tunnel and the protocol will be EBGP (or IBGP if the same AS numbers were used). 13

6.2 Test connectivity Administration Execute a command ping <IP address of Ethernet port on other router> Central HQ (IPSec responder) Remote site (Initiator) Note: Although this guide is written using ADSL and Cellular connectivity the testing was done using Ethernet as the WAN connectivity, this is why the ping response time is 0.00 seconds. 14

7 SCALING UP - ADDING MORE SITES This scenario can be scaled up to add more connected sites to the Central HQ router. To add another site, create an IPSec/GRE tunnel between the Central HQ router and the new site router. The next tunnel on the Central HQ router to the new site will be Tun1 with local IP address 192.168.0.5/30 and remote IP address 192.168.0.6/30. Note the use of the new command set nexthop self in the BGP configuration file, this is only used on the Central HQ router to enable routing between sites, the command will set the Central HQ router as the next hop when advertising updates about remote networks. bgp.conf from Site 2 router #macros # global configuration AS 65003 router-id 172.30.2.1 holdtime 180 holdtime min 3 log updates network 172.30.2.0/24 neighbor 192.168.0.5{ remote-as 65001 announce all depend on tun0 } [blank line] bgp.conf from Central HQ router #macros # global configuration AS 65001 router-id 172.30.0.1 holdtime 180 holdtime min 3 log updates network 172.30.0.0/24 neighbor 192.168.0.2{ remote-as 65002 announce all set nexthop self depend on tun0 } neighbor 192.168.0.6{ remote-as 65003 announce all set nexthop self depend on tun1 } [blank line] bgp.conf from Site 1 router #macros # global configuration AS 65002 router-id 172.30.1.1 holdtime 180 holdtime min 3 log updates network 172.30.1.0/24 neighbor 192.168.0.1{ remote-as 65001 announce all depend on tun0 } [blank line] 15

8 BASIC TROUBLESHOOTING Make sure the IPSec tunnel is up. Execute sastat from the CLI. Check the GRE tunnel is up. Execute tunstat 0 or tunstat 1 from the CLI. Disable the firewall if it is enabled. Enable Debug. From CLI, debug 0 if using a serial connection, debug t if using telnet. Then issue the command bgp 0 debug 3 for high level debug output. Stop and start BGP from the CLI and make sure BGP is starting correctly from the output. To stop BGP bgp 0 enable off, to restart BGP bgp 0 enable on. The output should be similar to the following: The BGP process can be further debugged using the bgpctl command. The usage of bgpctl is documented at the following web site: http://www.openbsd.org/cgi-bin/man.cgi?query=bgpctl Useful (abbreviated) commands are: bgpctl sh nei bgpctl sh fib bgpctl sh rib bgpctl sh sum bgpctl sh ip bgp det Shows neighbours and stats Show the forwarding information base Shows the routing information base Shows a summary of neighbours, AS s & uptime Shows details information about BGP neighbours 16

9 APPENDIX A 9.1 Using Static routes instead of a dynamic routing protocol If a dynamic routing protocol is not needed, this configuration is still very useful. Static routes can be used to route traffic over the GRE link instead. The advantage of this configuration is that non-contiguous subnets can be routed to via a GRE tunnel. This is not possible with a regular IPSec VPN. With a regular IPSec VPN, you would need to widen the mask to capture all subnets that need routing via the tunnel or use multiple tunnels. With GRE tunnels, you can specify multiple subnets if required and just point that traffic at the GRE tunnel. Configure as above, but stop after Section 4, do not proceed to section 5, then continue from here. 9.1.1 Check the GRE tunnel status Diagnostics - Status > GRE Central HQ (IPSec responder) Remote site (Initiator) The GRE tunnel status should be shown as Up. 17

9.1.2 Configure Static Routes Configuration - Routing > Static route 0-9 > Static route 0 Central HQ (IPSec responder) Remote site (Initiator) It is necessary to configure the remote network IP address, subnet mask and the GRE tunnel interface to use. As this is a point-to-point tunnel a gateway address is not required. 9.1.3 Save your config changes to profile 0 Administration - Save configuration 9.1.4 Check the routing tables Execute a command route print 18

Central HQ (IPSec responder) route print Destination Gateway Metric Protocol Idx Interface Status ------------------------------------------------------------------------------ 10.1.0.0/16 10.1.51.2 1 Local - ETH 0 UP 172.30.0.0/24 172.30.0.1 1 Local - ETH 1 UP 172.30.1.0/24 2 Static 0 TUN 0 UP 192.168.0.0/30 192.168.0.1 1 Local - TUN 0 UP 217.34.133.16/28 217.34.133.21 1 Local - ETH 3 UP OK 0.0.0.0/0 217.34.133.29 2 Static 3 ETH 3 UP Remote site (Initiator) route print Destination Gateway Metric Protocol Idx Interface Status ------------------------------------------------------------------------------ 10.1.0.0/16 10.1.51.4 1 Local - ETH 0 UP 172.30.1.0/24 172.30.1.1 1 Local - ETH 1 UP 192.168.0.0/30 192.168.0.2 1 Local - TUN 0 UP 172.30.0.0/24 1 Static 0 TUN 0 UP OK 0.0.0.0/0 10.1.2.100 1 Static 0 ETH 0 UP Viewing the routing table shows: The local LAN segment and the interface it is configured on. The GRE tunnel /30 subnet. The gateway address is the remote GRE IP address. The remote LAN subnet. This will be routed to via TUN 0, configured as a Static route. 19

9.1.5 Test connectivity Administration Execute a command ping <IP address of Ethernet port on other router> Central HQ (IPSec responder) Remote site (Initiator) Note: Although this guide is written using ADSL and Cellular connectivity the testing was done using Ethernet as the WAN connectivity, this is why the ping response time is 0.00 seconds. 20