AN-0003-ENG-02 LAN2LAN_IPsec_VPN_MRD3xx-MRD3xx.vsd

12
www.westermo.com LAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com Application Note LAN to LAN IPsec VPN Between MRD-3xx 3G routers AN-0003-02 Page 1

Transcript of AN-0003-ENG-02 LAN2LAN_IPsec_VPN_MRD3xx-MRD3xx.vsd

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

LAN to LAN IPsec VPNBetween MRD-3xx 3G routers

AN-0003-02 Page 1

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

IPsec VPNA virtual private network (VPN) is a private data network that makes use of thepublic telecommunication infrastructure, maintaining privacy through the use of atunnelling protocol and security procedures. A virtual private network can becontrasted with a system of owned or leased lines that can only be used by onecompany. The main purpose of a VPN is to give the company the samecapabilities as private leased lines at much lower cost by using the shared publicinfrastructure. Phone companies have provided private shared resources for voicemessages for over a decade. A virtual private network makes it possible to havethe same protected sharing of public resources for data.

IPsec is a suite of protocols for providing peer authentication without transmittingthe actual keys. Confidentiality using encryption and integrity ensuring that thereceived data can only come from the authenticated peer and has not beenaltered in any way.

IPsec Encrypting Security Payload tunnels also provide transparency for all nodesand applications using IP and only the VPN gateways needs to be configured tosecurely connect geographically separated networks.

Firstly we will describe and determine all the parameters necessary for thisconfiguration. These values will be written into the “IPsec Network setup table”

The numbers and parameter values from the “IPsec Network setup table” will beused throughout this guide while first configuring the responder and secondly theinitiator.

AN-0003-02 Page 2

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

Network setup description

This application note describes how to implement a LAN to LAN IPsec VPN tunnelbetween two Westermo MRD-3xx 3G Routers.

It is important to decide which of the two routers will be the initiator and which will bethe responder. In nearly all cases, the responder will be a VPN gateway, which islocated at a central location, such as company headquarters. In all cases theresponder must have a publicly accessible IP address to connect across internet.

In this example the MRD-310 has a 3G subscription that dynamically assigns aprivate IP address and is hidden behind a Network Address Translation (NAT)device. As such it can only be the initiator.

The MRD-330 has a 3G subscription with a fixed public IP address. The MRD-3303G Router will be the responder.

For authentication we will be using Pre-Shared Key (PSK). Simple and practical forinitial and small-scale VPN configurations it is however very susceptible to socialengineering. Large scale or long-term deployment should use certificates forauthentication.This IPsec configuration uses Internet Key Exchange (IKEv1). If the IP addresses ofboth gateways are fixed or certificates are used it is recommended to use IKE mainmode which takes longer to establish connection but provides a higher level ofsecurity than aggressive mode.In this example the combination of dynamic IP address and preshared key requiresus to use IKE aggressive mode.

IKE supports many different types of identifiers (ID) for this example we have chosentype 2 FQDN.Please review RFC 2407 for further details.

Encapsulated Security Payload (ESP) is the final encrypted tunnel joining the twoLAN together. A ESP tunnel is unidirectional so two tunnels are used for full duplexcommunication. Advanced Encryption Standard (AES) is the recommendedencryption standard to use since it is more secure and more efficient than the older3DES encryption.

This configuration is valid for:Westermo MRD-3xx firmware version 1.11

AN-0003-02 Page 3

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

IPsec Network setup table

Initiator ResponderGeneral

External Address IP or FQDN 1 any 2 217.174.88.165Internal IP address 3 192.168.20.0 4 192.168.33.0Internal subnet mask 5 255.255.255.0 6 255.255.255.0ID type 7 2 RFC2407 8 2ID value 9 mrd310.initiator 10 mrd330.responderPSK 11 secretCertificate 12 13

NAT Traversal 14 YESNAT-T keepalive 15 20sDead Peer Detection 16 NODPD delay & timeout 17

MTU 18 19

IKE phase 1 Mode 20 AggressiveEncryption 21 AES (128)Authentication 22 MD5Diffie Hellman Group 23 2IKE SA Lifetime 24 3600s

IKE phase 2ESP encryption 25 AES (128)ESP authentication 26 MD5SA Lifetime 27 28800sPerfect Forward Secrecy 28 2

Internet

APNAPN

ResponderInitiator

192.168.20.0/24 192.168.33.0/24

217.174.88.165

192.168.20.200 192.168.33.200

LAN to LAN IPsec tunnel

AN-0003-02 Page 4

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

1

MRD-330 Responder VPN configurationMake sure you have configured your MRD-3xx 3G router as described in the User Guide.Access the routers web interface and select VPN in the top menu followed by ”IPsec VPN” in the sub menu.

to start configuring a new VPN tunnel.The Local interface should be WLS for the wireless 3G/GPRS interface. Remote host 0.0.0.0 allows theinitiator to have any address. Responder should not ”Initiate tunnel”.

Press

PressNext we configure the authentication and proposal for Internet Key Exchange (IKE)The ID must be preceeded with a @ sign to indicate a type 2 or 3 ID (RFC2407) string.

21 22 23

11

9

20

24

10

Press

AN-0003-02 Page 5

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

MRD-330 Responder Phase 2Configures two ESP tunnels for the actual protected traffic.LAN to LAN IPsec must know which IP packets to protect so these must be specified in tunnel networksaddress with subnet address/subnet mask. LAN subnet will apply the subnet and mask configured on theEthernet ports of the MRD-330

Press

4

25

3

2826

27

151419

Finally we set NAT traversal since our MRD-310 has a private IP address dynamically assigned from the3G provider.Set Enabled, to start the IPsec VPN connection.Press

AN-0003-02 Page 6

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

Firewall configuration

The default firewall policy for the wireless interface is deny all.The responder must open the IKE server port in order for the IKE exchange to start.Goto Firewall > Access Control webpage and select IPsec VPN allow box for the WLS interface.This allows traffic towards UDP ports 500 and 4500 aswell as IP protocol 50 for ESP packets.There is no need change anything on the initiator firewall.

The firewall must beopened to allow IKE

(port 500 and 4500) andESP (protocol 50) to

Access the Responder

AN-0003-02 Page 7

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

MRD-310 Initiator VPN configurationMake sure you have configured your MRD-3xx 3G router as described in the User Guide.Access the routers web interface and select VPN in the top menu followed by ”IPsec VPN” in the sub menu.

to start configuring a new VPN tunnel.The local interface should be WLS for the wireless 3G/GPRS interface.Press

Next we configure the authentication and proposal for Internet Key Exchange (IKE)The ID must be preceeded with a @ sign to indicate a type 2 or 3 ID (RFC2407) string.

Press

Press

2

17

21

10

22

11

920

2324

AN-0003-02 Page 8

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

MRD-310 Initiator Phase 2Configures two ESP tunnels for the actual protected traffic.LAN to LAN IPsec must know which IP packets to protect so these must be specified in tunnel networksaddress with subnet address/subnet mask. LAN subnet will apply the subnet and mask configured on theEthernet port of the MRD-310

Finally we set NAT traversal since our MRD-310 has a private IP address dynamically assigned fromthe 3G provider.Set Enabled, to start the IPsec VPN connection.

Press

Press

25

4

27

3

2628

14 1518

AN-0003-02 Page 9

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

Diagnostics

After a few seconds the negotiation should be completed and the Status > VPN should indicate Connectedand you can try to ping the right most subnet.If the connection is not successful review your configuration on both initiator and responder aswell as theSystem Log on both units.

AN-0003-02 Page 10

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

IPsec Network setup table

Initiator ResponderGeneral

External Address IP or FQDN 1 2

Internal IP address 3 4

Internal subnet mask 5 6

ID type 7 RFC2407 8

ID value 9 10

PSK 11

Certificate 12 13

NAT Traversal 14

NAT-T keepalive 15

Dead Peer Detection 16

DPD delay & timeout 17

MTU 18 19

IKE phase 1 Mode 20

Encryption 21

Authentication 22

Diffie Hellman Group 23

IKE SA Lifetime 24

IKE phase 2ESP encryption 25

ESP authentication 26

SA Lifetime 27

Perfect Forward Secrecy 28

Internet

APNAPN

ResponderInitiator

LAN to LAN IPsec tunnel

AN-0003-02 Page 11

www.westermo.comLAN to LAN IPsec MRD-310 to MRD-330 www.westermo.com

Application Note

[email protected]: +46 (0)16 42 80 00Fax: +46 (0)16 42 80 01

[email protected]él : +33 1 69 10 21 00Fax : +33 1 69 10 21 01

United KingdomWeb: [email protected]: +44 (0)1489 580585Fax: +44 (0)1489 580586

[email protected] +65 6743 9801Fax +65 6745 0670

[email protected]: +49(0)7254 95400-0Fax: +49(0)7254-95400-9

Technical SupportIf you require assistance with any of the instructions in this application note you cancontact Westermo as follows:

AN-0003-02 Page 12