Tischplattenbeißpotential:

1. ACL 110 auf R1 (und später auch R3) "interessanten" Traffic definieren vom LAN an R1 (192.168.1.0/24) zum LAN an R3 (192.168.3.0/24)
R1(config)#acc 110 permit ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255
-> hier ist kein explizites deny any any verlangt und wird sogar als falsch gewertet
-> Erinnerung: ACLs, die für VPNs genutzt werden, blockieren KEINEN Traffic, sondern geben an, welche Datenflüsse verschlüsselt werden sollen, und welche nicht. Das explizite Deny zeigt beim Verifizieren nur an, welche Daten unverschlüsselt übertragen wurden.
Und spiegelverkehrt (wichtig!) auf R3:
R3(config)#acc 110 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
2. Auf R1 die in der Aufgabenstellung definierten ISAKMP Phase 1-Eigenschaften konfigurieren
-> einige der Eigenschaften aus der Tabelle sind default-Werte und müssen deshalb nicht explizit konfiguriert werden
R1(config)#crypto isakmp policy 10
R1(config-isakmp)#encryption aes
-> default: des
R1(config-isakmp)#authentication pre-share
-> default: rsa
R1(config-isakmp)#group 2
-> default: 1
Öffentlichen Schlüssel definieren, weil bei "authentication" "pre-share" gewählt wurde
R1(config)#crypto isakmp key vpnpa55 address 10.2.2.2
-> Die IP-Adresse 10.2.2.2 gehört zu R3; auf diesem Router muss das gleiche definiert werden, aber die IP-Adresse ist in dem Fall 10.1.1.2
3. ISAKMP Phase 2-Eigenschaften (transform-set)
Name: VPN-SET, Methoden: esp-3des und esp-sha-hmac
R1(config)#crypto ipsec transform-set VPN-SET esp-3des esp-sha-hmac
Sequenznummer: 10, identifizieren als ipsec-isakmp map
R1(config)#crypto map VPN-MAP 10 ipsec-isakmp
Weitere Eigenschaften:
R1(config-crypto-map)#set peer 10.2.2.2
-> Tunnel wird zu R3 aufgebaut
R1(config-crypto-map)#set transform-set VPN-SET
R1(config-crypto-map)#match address 110
-> 110 ist unsere ACL
4. Die erstellte crypto map VPN-MAP an S0/0/0 anbringen
R1(config)#interface Serial0/0/0
R1(config-if)#crypto map VPN-MAP
-> die folgende Meldung erscheint:
*Jan 3 07:16:26.785: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
5. Verifizieren:
a) Die running-config anschauen
R1# sh run
...
crypto map VPN-MAP 10 ipsec-isakmp
! Incomplete
...
-> wenn so etwas in der running-config steht, wurde bestimmt ein Parameter vergessen - oder die ACL,...
b) Spezielle Verifizierungstools nutzen:
-> bevor "interessanter" Traffic erzeugt wurde:
R3#sh cryp ipsec sa
No SAs found
R3#sh cryp isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id slot status
IPv6 Crypto ISAKMP SA
-> nach dem erfolgreichen Ping:
R3#sh cryp isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id slot status
10.1.1.2 10.2.2.2 QM_IDLE 1072 0 ACTIVE
IPv6 Crypto ISAKMP SA
R3#sh cryp ipsec sa
interface: Serial0/0/1
Crypto map tag: VPN-MAP, local addr 10.2.2.2
protected vrf: (none)
local ident (addr/mask/prot/port): (192.168.3.0/255.255.255.0/0/0)
remote ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)
current_peer 10.1.1.2 port 500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 2, #pkts encrypt: 2, #pkts digest: 0
#pkts decaps: 2, #pkts decrypt: 2, #pkts verify: 0
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 1, #recv errors 0
local crypto endpt.: 10.2.2.2, remote crypto endpt.:10.1.1.2
path mtu 1500, ip mtu 1500, ip mtu idb Serial0/0/1
current outbound spi: 0x31AE2FDD(833499101)
inbound esp sas:
spi: 0x206C66DF(543975135)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2001, flow_id: FPGA:1, crypto map: VPN-MAP
sa timing: remaining key lifetime (k/sec): (4525504/86381)
IV size: 16 bytes
replay detection support: N
Status: ACTIVE
inbound ah sas:
inbound pcp sas:
outbound esp sas:
spi: 0x31AE2FDD(833499101)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2002, flow_id: FPGA:1, crypto map: VPN-MAP
sa timing: remaining key lifetime (k/sec): (4525504/86381)
IV size: 16 bytes
replay detection support: N
Status: ACTIVE
outbound ah sas:
outbound pcp sas:
R3#sh acc 110
Extended IP access list 110
permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255 (1 match(es))
R3#sh crypto map
Crypto Map VPN-MAP 10 ipsec-isakmp
Peer = 10.1.1.2
Extended IP access list 110
access-list 110 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
Current peer: 10.1.1.2
Security association lifetime: 4608000 kilobytes/86400 seconds
PFS (Y/N): Y
Transform sets={
VPN-SET,
}
Interfaces using crypto map VPN-MAP:
Serial0/0/1
R3#sh crypto isakmp policy
Global IKE policy
Protection suite of priority 10
encryption algorithm: AES - Advanced Encryption Standard (128 bit keys).
hash algorithm: Secure Hash Standard
authentication method: Pre-Shared Key
Diffie-Hellman group: #2 (1024 bit)
lifetime: 86400 seconds, no volume limit
Default protection suite
encryption algorithm: DES - Data Encryption Standard (56 bit keys).
hash algorithm: Secure Hash Standard
authentication method: Rivest-Shamir-Adleman Signature
Diffie-Hellman group: #1 (768 bit)
lifetime: 86400 seconds, no volume limit
R3#sh crypto ipsec transform-set
Transform set VPN-SET: { { esp-3des esp-sha-hmac }
will negotiate = { Tunnel, },

1. ACL 110 auf R1 (und später auch R3) "interessanten" Traffic definieren vom LAN an R1 (192.168.1.0/24) zum LAN an R3 (192.168.3.0/24)
R1(config)#acc 110 permit ip 192.168.1.0 0.0.0.255 192.168.3.0 0.0.0.255
-> hier ist kein explizites deny any any verlangt und wird sogar als falsch gewertet
-> Erinnerung: ACLs, die für VPNs genutzt werden, blockieren KEINEN Traffic, sondern geben an, welche Datenflüsse verschlüsselt werden sollen, und welche nicht. Das explizite Deny zeigt beim Verifizieren nur an, welche Daten unverschlüsselt übertragen wurden.
Und spiegelverkehrt (wichtig!) auf R3:
R3(config)#acc 110 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
2. Auf R1 die in der Aufgabenstellung definierten ISAKMP Phase 1-Eigenschaften konfigurieren
-> einige der Eigenschaften aus der Tabelle sind default-Werte und müssen deshalb nicht explizit konfiguriert werden
R1(config)#crypto isakmp policy 10
R1(config-isakmp)#encryption aes
-> default: des
R1(config-isakmp)#authentication pre-share
-> default: rsa
R1(config-isakmp)#group 2
-> default: 1
Öffentlichen Schlüssel definieren, weil bei "authentication" "pre-share" gewählt wurde
R1(config)#crypto isakmp key vpnpa55 address 10.2.2.2
-> Die IP-Adresse 10.2.2.2 gehört zu R3; auf diesem Router muss das gleiche definiert werden, aber die IP-Adresse ist in dem Fall 10.1.1.2
3. ISAKMP Phase 2-Eigenschaften (transform-set)
Name: VPN-SET, Methoden: esp-3des und esp-sha-hmac
R1(config)#crypto ipsec transform-set VPN-SET esp-3des esp-sha-hmac
Sequenznummer: 10, identifizieren als ipsec-isakmp map
R1(config)#crypto map VPN-MAP 10 ipsec-isakmp
Weitere Eigenschaften:
R1(config-crypto-map)#set peer 10.2.2.2
-> Tunnel wird zu R3 aufgebaut
R1(config-crypto-map)#set transform-set VPN-SET
R1(config-crypto-map)#match address 110
-> 110 ist unsere ACL
4. Die erstellte crypto map VPN-MAP an S0/0/0 anbringen
R1(config)#interface Serial0/0/0
R1(config-if)#crypto map VPN-MAP
-> die folgende Meldung erscheint:
*Jan 3 07:16:26.785: %CRYPTO-6-ISAKMP_ON_OFF: ISAKMP is ON
5. Verifizieren:
a) Die running-config anschauen
R1# sh run
...
crypto map VPN-MAP 10 ipsec-isakmp
! Incomplete
...
-> wenn so etwas in der running-config steht, wurde bestimmt ein Parameter vergessen - oder die ACL,...
b) Spezielle Verifizierungstools nutzen:
-> bevor "interessanter" Traffic erzeugt wurde:
R3#sh cryp ipsec sa
No SAs found
R3#sh cryp isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id slot status
IPv6 Crypto ISAKMP SA
-> nach dem erfolgreichen Ping:
R3#sh cryp isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id slot status
10.1.1.2 10.2.2.2 QM_IDLE 1072 0 ACTIVE
IPv6 Crypto ISAKMP SA
R3#sh cryp ipsec sa
interface: Serial0/0/1
Crypto map tag: VPN-MAP, local addr 10.2.2.2
protected vrf: (none)
local ident (addr/mask/prot/port): (192.168.3.0/255.255.255.0/0/0)
remote ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)
current_peer 10.1.1.2 port 500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 2, #pkts encrypt: 2, #pkts digest: 0
#pkts decaps: 2, #pkts decrypt: 2, #pkts verify: 0
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 1, #recv errors 0
local crypto endpt.: 10.2.2.2, remote crypto endpt.:10.1.1.2
path mtu 1500, ip mtu 1500, ip mtu idb Serial0/0/1
current outbound spi: 0x31AE2FDD(833499101)
inbound esp sas:
spi: 0x206C66DF(543975135)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2001, flow_id: FPGA:1, crypto map: VPN-MAP
sa timing: remaining key lifetime (k/sec): (4525504/86381)
IV size: 16 bytes
replay detection support: N
Status: ACTIVE
inbound ah sas:
inbound pcp sas:
outbound esp sas:
spi: 0x31AE2FDD(833499101)
transform: esp-3des esp-sha-hmac ,
in use settings ={Tunnel, }
conn id: 2002, flow_id: FPGA:1, crypto map: VPN-MAP
sa timing: remaining key lifetime (k/sec): (4525504/86381)
IV size: 16 bytes
replay detection support: N
Status: ACTIVE
outbound ah sas:
outbound pcp sas:
R3#sh acc 110
Extended IP access list 110
permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255 (1 match(es))
R3#sh crypto map
Crypto Map VPN-MAP 10 ipsec-isakmp
Peer = 10.1.1.2
Extended IP access list 110
access-list 110 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255
Current peer: 10.1.1.2
Security association lifetime: 4608000 kilobytes/86400 seconds
PFS (Y/N): Y
Transform sets={
VPN-SET,
}
Interfaces using crypto map VPN-MAP:
Serial0/0/1
R3#sh crypto isakmp policy
Global IKE policy
Protection suite of priority 10
encryption algorithm: AES - Advanced Encryption Standard (128 bit keys).
hash algorithm: Secure Hash Standard
authentication method: Pre-Shared Key
Diffie-Hellman group: #2 (1024 bit)
lifetime: 86400 seconds, no volume limit
Default protection suite
encryption algorithm: DES - Data Encryption Standard (56 bit keys).
hash algorithm: Secure Hash Standard
authentication method: Rivest-Shamir-Adleman Signature
Diffie-Hellman group: #1 (768 bit)
lifetime: 86400 seconds, no volume limit
R3#sh crypto ipsec transform-set
Transform set VPN-SET: { { esp-3des esp-sha-hmac }
will negotiate = { Tunnel, },
Keine Kommentare:
Kommentar veröffentlichen