IPsec Configuration


광고

· Tunneling makes it doable to make use of a public TCP/IP community, such because the Web, to create safe connections between distant customers. Every safe connection is known as a tunnel.

· The safety equipment makes use of the ISAKMP and IPsec tunneling requirements to construct and handle tunnels.

· The safety equipment capabilities as a bidirectional tunnel endpoint. It may possibly obtain plain packets from the non-public community, encapsulate them, create a tunnel, and ship them to the opposite finish of the tunnel the place they’re unencapsulated and despatched to their remaining vacation spot.

· It may possibly additionally obtain encapsulated packets from the general public community, unencapsulate them, and ship them to their remaining vacation spot on the non-public community.

· IPsec offers authentication and encryption services to forestall unauthorized viewing or modification of information inside your community or because it travels over an unprotected community, reminiscent of the general public Web.

· Two varieties of connections supported by IPSEC: LAN to LAN vpn, CLIENT to LAN vpn.

· Throughout tunnel institution, the 2 friends negotiate safety associations that govern authentication, encryption, encapsulation, and key management.

· These negotiations contain two phases: first, to ascertain the tunnel (the IKE SA); and second, to control visitors inside the tunnel (the IPsec SA).

· A LAN-to-LAN VPN connects networks in several geographic places. In IPsec LAN-to-LAN connections, the safety equipment can operate as initiator or responder.

· In IPsec client-to-LAN connections, the safety equipment capabilities solely as responder.

· Initiator (Router or shopper) suggest SAs (Router); responders settle for, reject, or make counter-proposals-all in accordance with configured SA parameters. To determine a connection, each entities should agree on the SAs.( Safety associations)

· Our first activity is specifying an Web Key Change (IKE) coverage.

· IKE depends on ISAKMP to ascertain an preliminary safe channel/tunnel over which the IPsec tunnel will be negotiated.

· An IKE coverage controls the attributes of the ISAKMP session, together with the encryption kind and hashing strategies.

· We have to manually outline on this case the authentication technique, I.e preshared keys.

R1(config)# crypto isakmp coverage 10
R1(config-isakmp)# authentication preshare
R1(config-isakmp)# ^Z
R1# sh crypto isakmp coverage

World IKE coverage

Safety suite of precedence 10

encryption algorithm: DES – Information Encryption Normal (56 bit keys).
(Objective: Scramble, unscramble information)

hash algorithm: Safe Hash Normal (Objective: present information integrity)

authentication technique: Pre-Shared Key

Diffie-Hellman group: #1 (768 bit) (Objective: decide the energy of the important thing utilized in the important thing change course of. Increased group numbers (Diffie-Hellman 2, Diffie-Hellman 5, Diffie-Hellman 14 and many others.) are safer, however require extra time to compute the important thing.)

lifetime is 86400 seconds, no quantity restrict

· As talked about, we’ll must outline a preshared key (versus implementing stronger however extra complicated public keying). The hot button is a string of textual content used to initialize the IKE tunnel, configured identically on each routers. In our instance, the string CISCO is used; in follow, I’d clearly counsel a a lot stronger key GRAEGRAE.

· The IP handle which follows the important thing definition specifies the host for which the important thing must be used.

R1(config)# crypto isakmp key 0 CISCO handle 172.16.0.6

· Make sure that to mirror this configuration on the alternative finish of the tunnel at R3 (use 172.16.0.1 as a substitute of.6).

R3(config)# crypto isakmp key 0 CISCO handle 172.16.0.1

· As soon as our IKE coverage has been setup we are able to transfer on to defining an IPsec remodel set.

· The remodel set defines the parameters which is able to carry the precise information.

· In contrast to defining an IKE coverage, which offers a default for all attributes, we should explicitly state the encryption and hash kind we need to use with our remodel set. Our instance will implement ESP encapsulation with 3DES encryption and SHA-1 authentication.

· Inside remodel set configuration, now we have the choice to pick out IPSEC MODE (tunnel or transport mode), nevertheless tunnel mode is the default mode.

We will examine our newly created remodel set with present crypto ipsec transform-set:

R1(config)# crypto ipsec transform-set MyTransformSet esp-3des esp-sha-hmac
R1(cfg-crypto-trans)# ^Z
R1# present crypto ipsec transform-set
Rework set MyTransformSet: { esp-3des esp-sha-hmac }
will negotiate = { Tunnel, },

· Now that now we have our IPsec remodel set created, we give reference to it from an IPsec profile to be utilized to a tunnel interface:

R1(config)# crypto ipsec profile MyProfile
R1(ipsec-profile)# set transform-set MyTransformSet
R1(ipsec-profile)# ^Z
R1# present crypto ipsec profile
IPSEC profile MyProfile
Safety affiliation lifetime: 4608000 kilobytes/3600 seconds
PFS (Y/N): N
Rework units={
MyTransformSet,
}

· Our final step is to configure the tunnel interfaces on routers 1 and router 3 for IPsec operation

R1(config)# interface tun0
R1(config-if)# tunnel mode ipsec ipv4
R1(config-if)# tunnel safety ipsec profile MyProfile

Remaining Configurations

R1
crypto isakmp coverage 10
authentication pre-share
crypto isakmp key CISCO handle 172.16.0.6 (configuring preshared key)
!
crypto ipsec transform-set MyTransformSet esp-3des esp-sha-hmac (Creating remodel set together with encryption and hash kind we need to use)
!
crypto ipsec profile MyProfile
set transform-set MyTransformSet (reference for remodel set from an IPsec profile to be utilized on tunnel interface)
!
interface Tunnel0
ip handle 10.0.0.1 255.255.255.252
tunnel supply 172.16.0.1
tunnel vacation spot 172.16.0.6
tunnel mode ipsec ipv4
tunnel safety ipsec profile MyProfile
!
interface FastEthernet0/0
ip handle 172.16.0.1 255.255.255.252

R3
crypto isakmp coverage 10
authentication pre-share
crypto isakmp key CISCO handle 172.16.0.1
!
crypto ipsec transform-set MyTransformSet esp-3des esp-sha-hmac
!
crypto ipsec profile MyProfile
set transform-set MyTransformSet
!
interface Tunnel0
ip handle 10.0.0.2 255.255.255.252
tunnel supply 172.16.0.6
tunnel vacation spot 172.16.0.1
tunnel mode ipsec ipv4
tunnel safety ipsec profile MyProfile
!
interface FastEthernet0/0
ip handle 172.16.0.6 255.255.255.252