09 - SRX - Ipsec VPN
09 - SRX - Ipsec VPN
2011-07
DEFINING VPNS
Encrypted Packet
Private
10.0.0.254
10.0.0.5
10.0.0.6 IP Packet
Sender Receiver
Sender Receiver
1 Pub Pub
Encrypted data
Original data + Pub + Priv
2 4
3
Encrypted data Original data
7 Copyright © 2009 Juniper Networks, Inc. www.juniper.net
INTEGRITY
80mod11 =3
13mod5 =3
203mod10 =3
11mod8 =3
100mod97 =3
Hash functions can use the modulus operation in the hash creation
process
Sender Receiver
Data HASH
Data
3
2 Data HASH
1
Data HASH
HASH HASH
5
If the hash values
match, the data is good
10 Copyright © 2009 Juniper Networks, Inc. www.juniper.net
SOURCE AUTHENTICATION
Sender Receiver
Data HASH
Data Hash key
+
3
Data HASH
HASH HASH
5
If the hash
If the
values
hashmatch,
valuesthe data is
good
match,
andthe
thedata
source
is good
is valid
12 Copyright © 2009 Juniper Networks, Inc. www.juniper.net
HOW ARE KEYS EXCHANGED?
Internet
Local private and remote public SESSION Same session key, SESSION
keys are used in DH to form a KEY two different places KEY
common session key
15 Copyright © 2009 Juniper Networks, Inc. www.juniper.net
IPSEC OVERVIEW
Trust Untrust
10.0.0.1 10.10.0.6
10.0.0.6 2.2.8.1
Corporate Office
Message 1:
Cookie I, SA Proposal Message 2:
List Cookie I, Cookie R, SA Proposal Accept
Message 3:
DH Public Value A, Nonce I (Random #) Message 4:
DH Public Value B, Nonce R (Random #)
Message 5:
Identification I, Hash [ID-I + key] Message 6:
Encrypted and Authenticated Identification R, Hash [ID-R + key]
22 Copyright © 2009 Juniper Networks, Inc. www.juniper.net
IKE PHASE 1: AGGRESSIVE MODE
Remote Corporate
Message 1:
Cookie I, SA proposal list, DH public value A, nonce I
Message 2:
Cookie I, cookie R, SA proposal accept, DH public
value B, nonce R, identification hash R
Message
3:
Hash [ID-I and authenticated
Encrypted
+key]
23 Copyright © 2009 Juniper Networks, Inc. www.juniper.net
IKE PHASE 2: QUICK MODE
Remote Corporate
Message 1:
Hash using phase 1 information,
message ID, SA proposal list, Nonce I,
[DH Public Key I ], proxy ID
Message 2:
Hash using phase 1 information,
message ID, SA proposal list accept,
Nonce R, [DH Public Key I ], proxy ID
Message 3:
Hash using phase 1 information,
message ID, Nonce I, Nonce R
24 Copyright © 2009 Juniper Networks, Inc. www.juniper.net
IPSEC DYNAMIC TUNNEL ESTABLISHMENT—
SUMMARY
Remote Corporate Juniper Networks
Phase
Header, SA, DH 1 Header, SA, DH
Phase
SA, Proxy ID 2 SA, Proxy ID
IPsec tunnel
B
IPsec VPN
E
A
LAN LAN
C
Original Packet
IP header TCP Data
Authenticated
Original packet
IP header TCP Data
Sequence
SPI
number
Encrypted
Authenticated
1 10.1.10.5 10.1.210.5
4 10.1.10.5 10.1.210.5
9 HASH = HASH
12 From zone Public tozone Private: if SA=10.1.10.5 & DA=10.1.210.5 & Application= all, then use tunnel
Phase
Header, SA, DH 1 Header, SA, DH
Phase
SA, Proxy ID 2 SA, Proxy ID
IPsec tunnel
Step A:
Configuring IKE phase 1 proposals:
[edit security ike]
user@host# show
proposal proposal-name {
authentication-method [pre-shared-keys | rsa-signatures];
dh-group [group1 | group2 | group5];
authentication-algorithm [md5 | sha-256 | sha1];
encryption-algorithm [3des-cbc | aes-128-cbc | aes-192-cbc | aes-256-cbc | des-cbc];
lifetime-seconds seconds;
…
}
Optionally, use JUNOS software’s predefined phase 1 proposal from
these choices:
basic
compatible
standard
Step B:
Configure IKE phase 1 policies and reference the IKE proposals
Step C:
Configure the IKE phase 1 gateway and reference the IKE policy
configured in Step B
Optionally, use JUNOS software’s predefined phase 1 proposal from these choices:
basic
compatible
standard
Step B:
Configure the IKE phase 2 policies and reference the IKE proposals
Step C:
Configure the IKE phase 2 VPN tunnel and reference the IKE phase 2
policy configured in Step B
Steps:
[edit interface]
user@host# show
st0 {
unit number { [edit security zones]
family inet { user@host# show security-zone zone-name
address address; …
mtu mtu-size; interfaces {
} ge-1/0/1.0;
} st0.0;
} }
…
HR Public
Zone Zone
Edge Remote
Internet 1.1.70.1
A ge-1/0/1 C
B
PrivatePC 2.2.2.1
10.1.10.5
1.1.80.0/28
HR Public
Zone Edge
Zone Remote
Internet 1.1.70.1
A ge-1/0/1 ge-1/0/0 C
B
2.2.2.1
Private PC
10.1.10.5
Logical interface st0.0 (Index 67) (SNMP ifIndex 45) (Generation 134)
Flags: Point-To-Point SNMP-Traps Encapsulation: Secure-Tunnel
Security: Zone: Public
Allowed host-inbound traffic : any-service
Flow Statistics :
Flow Input statistics :
Self packets : 0
ICMP packets : 144
VPN packets : 0
Bytes permitted by policy : 14112
Connections established : 0
…
The
55
output is continued on the next page …
Copyright © 2009 Juniper Networks, Inc. www.juniper.net
MONITORING A ROUTE-BASED IPSEC VPN—EDGE (3
OF 4)
…
Flow Output statistics:
Multicast packets : 0
Bytes permitted by policy : 15386
Flow error statistics (Packets dropped due to):
Address spoofing: 0
Authentication failed: 0
Incoming NAT errors: 0
Invalid zone received packet: 0
Multiple user authentications: 0
Multiple incoming NAT: 0
No parent for a gate: 0 Statistics
No one interested in self packets: 0 for the st0
No minor session: 0 interface
No more sessions: 0
No NAT gate: 0
No route present: 0
No SA for incoming SPI: 0
No tunnel found: 0
No session for a gate: 0
No zone or NULL zone binding 0
Policy denied: 0
Security association not active: 0
TCP sequence number out of window: 0
Syn-attack protection: 0
User authentication errors: 0
Protocol inet, MTU: 9192, Generation: 140, Route table: 0
Flags: None
Addresses, Flags: Is-Preferred Is-Primary
Destination: 1.1.80.0/28, Local: 1.1.80.2, Broadcast: Unspecified,
Generation: 140
Logical interface st0.0 (Index 67) (SNMP ifIndex 48) (Generation 134)
Flags: Point-To-Point SNMP-Traps Encapsulation: Secure-Tunnel
Security: Zone: Public
Allowed host-inbound traffic : ftp ping telnet
Flow Statistics :
Flow Input statistics :
Self packets : 0
ICMP packets : 144
VPN packets : 0
Bytes permitted by policy : 14112
Connections established : 144
…