Mainos / Advertisement:
Ero sivun ”Cisco IPSec” versioiden välillä
Siirry navigaatioon
Siirry hakuun
(4 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 12: | Rivi 12: | ||
* fa0/0 192.168.1.3 | * fa0/0 192.168.1.3 | ||
* fa0/1 10.11.0.1 | * fa0/1 10.11.0.1 | ||
+ | |||
+ | Varmista että sinulla on default route konfiguroitu vaikka sitä ei olisi oikeasti olemassa. Me käytämme 192.168.1.1 osoitetta. | ||
=== R2 Reitittimen konfiguaatiot === | === R2 Reitittimen konfiguaatiot === | ||
Rivi 30: | Rivi 32: | ||
<pre> | <pre> | ||
− | crypto isakmp key | + | crypto isakmp key 0 cisco address 192.168.1.3 |
</pre> | </pre> | ||
Rivi 42: | Rivi 44: | ||
<pre> | <pre> | ||
− | ip access-list | + | access-list 100 deny ip 10.10.0.0 0.0.0.255 10.11.0.0 0.0.0.255 |
− | permit ip 10. | + | access-list 100 permit ip 10.10.0.0 0.0.0.255 any |
+ | access-list 101 permit ip 10.10.0.0 0.0.0.255 10.11.0.0 0.0.0.255 | ||
</pre> | </pre> | ||
Rivi 53: | Rivi 56: | ||
set transform-set MY-SET | set transform-set MY-SET | ||
set pfs group2 | set pfs group2 | ||
− | match address | + | match address 101 |
</pre> | </pre> | ||
− | Lisää Crypto Map sitten ulospäin menevään interfaceen | + | Lisää Crypto Map sitten ulospäin menevään interfaceen sekä luo konfiguroi NAT ulospäin fa0/0 interfaceen. |
<pre> | <pre> | ||
− | interface 0 | + | interface FastEthernet0/0 |
− | + | ip address 192.168.1.2 255.255.255.0 | |
+ | ip nat outside | ||
+ | ip virtual-reassembly | ||
+ | duplex auto | ||
+ | speed auto | ||
+ | crypto map CMAP | ||
+ | ! | ||
+ | interface FastEthernet0/1 | ||
+ | ip address 10.10.0.1 255.255.255.0 | ||
+ | ip nat inside | ||
+ | ip virtual-reassembly | ||
+ | duplex auto | ||
+ | speed auto | ||
+ | ! | ||
+ | ip nat inside source list 100 interface FastEthernet0/0 overload | ||
</pre> | </pre> | ||
=== R3 reitittimen konfiguraatiot === | === R3 reitittimen konfiguraatiot === | ||
− | + | Vastaavanlainen, muuta vain IP:t | |
+ | |||
+ | <pre> | ||
+ | crypto isakmp policy 10 | ||
+ | encr aes 256 | ||
+ | authentication pre-share | ||
+ | group 2 | ||
+ | crypto isakmp key cisco address 192.168.1.2 | ||
+ | ! | ||
+ | ! | ||
+ | crypto ipsec transform-set MY-SET esp-aes 256 esp-sha-hmac | ||
+ | ! | ||
+ | crypto map CMAP 10 ipsec-isakmp | ||
+ | set peer 192.168.1.2 | ||
+ | set transform-set MY-SET | ||
+ | set pfs group2 | ||
+ | match address 101 | ||
+ | ! | ||
+ | ! | ||
+ | ! | ||
+ | interface FastEthernet0/0 | ||
+ | ip address 192.168.1.3 255.255.255.0 | ||
+ | ip nat outside | ||
+ | ip virtual-reassembly | ||
+ | duplex auto | ||
+ | speed auto | ||
+ | crypto map CMAP | ||
+ | ! | ||
+ | interface FastEthernet0/1 | ||
+ | ip address 10.11.0.1 255.255.255.0 | ||
+ | ip nat inside | ||
+ | ip virtual-reassembly | ||
+ | duplex auto | ||
+ | speed auto | ||
+ | ! | ||
+ | ip forward-protocol nd | ||
+ | ip route 0.0.0.0 0.0.0.0 192.168.1.1 | ||
+ | ! | ||
+ | ip http server | ||
+ | no ip http secure-server | ||
+ | ip nat inside source list 100 interface FastEthernet0/0 overload | ||
+ | ! | ||
+ | access-list 100 deny ip 10.11.0.0 0.0.0.255 10.10.0.0 0.0.0.255 | ||
+ | access-list 100 permit ip 10.11.0.0 0.0.0.255 any | ||
+ | access-list 101 permit ip 10.11.0.0 0.0.0.255 10.10.0.0 0.0.0.255 | ||
+ | </pre> | ||
=== Testaaminen === | === Testaaminen === | ||
+ | |||
+ | Nostaa yhteys pystyyn ping komennolla R2 mutta lisää sourceksi lähiverkon interface. | ||
+ | |||
+ | ping 10.11.0.1 source fastEthernet 0/1 | ||
+ | |||
+ | Aja komento | ||
show crypto session | show crypto session | ||
+ | |||
+ | Joka pitäisi tulostaa IP-ACTIVE (ei pitäisi olla INACTIVE). | ||
+ | |||
+ | <pre> | ||
+ | Crypto session current status | ||
+ | |||
+ | Interface: FastEthernet0/0 | ||
+ | Session status: UP-ACTIVE | ||
+ | Peer: 192.168.1.3 port 500 | ||
+ | IKE SA: local 192.168.1.2/500 remote 192.168.1.3/500 Active | ||
+ | IPSEC FLOW: permit ip 10.10.0.0/255.255.255.0 10.11.0.0/255.255.255.0 | ||
+ | Active SAs: 2, origin: crypto map | ||
+ | </pre> | ||
+ | |||
+ | Muita komentoja | ||
+ | |||
+ | show crypto ipsec sa |
Nykyinen versio 1. maaliskuuta 2017 kello 21.37
Sisällysluettelo
Site to Site
Käytössämme on kaksi Cisco reititintä. Ohje on tehty 1800 sarjaisille reitittimille.
R2:
- fa0/0 192.168.1.2
- fa0/1 10.10.0.1
R3:
- fa0/0 192.168.1.3
- fa0/1 10.11.0.1
Varmista että sinulla on default route konfiguroitu vaikka sitä ei olisi oikeasti olemassa. Me käytämme 192.168.1.1 osoitetta.
R2 Reitittimen konfiguaatiot
Luodaan ISAKMP Policy phace 1:lle.
Create an ISAKMP policy for Phase 1
crypto isakmp policy 10 encr aes 256 hash sha authentication pre-share exit
Luo Pre-Shared Key cisco IP:lle 192.168.1.3
crypto isakmp key 0 cisco address 192.168.1.3
crypto ipsec transform-set MY-SET esp-aes 128 esp-sha-hmac exit crypto ipsec security-association lifetime seconds 3600
Salli IPSec sisällepäin
access-list 100 deny ip 10.10.0.0 0.0.0.255 10.11.0.0 0.0.0.255 access-list 100 permit ip 10.10.0.0 0.0.0.255 any access-list 101 permit ip 10.10.0.0 0.0.0.255 10.11.0.0 0.0.0.255
Luodaan Crypto Map
crypto map CMAP 10 ipsec-isakmp set peer 192.168.1.3 set transform-set MY-SET set pfs group2 match address 101
Lisää Crypto Map sitten ulospäin menevään interfaceen sekä luo konfiguroi NAT ulospäin fa0/0 interfaceen.
interface FastEthernet0/0 ip address 192.168.1.2 255.255.255.0 ip nat outside ip virtual-reassembly duplex auto speed auto crypto map CMAP ! interface FastEthernet0/1 ip address 10.10.0.1 255.255.255.0 ip nat inside ip virtual-reassembly duplex auto speed auto ! ip nat inside source list 100 interface FastEthernet0/0 overload
R3 reitittimen konfiguraatiot
Vastaavanlainen, muuta vain IP:t
crypto isakmp policy 10 encr aes 256 authentication pre-share group 2 crypto isakmp key cisco address 192.168.1.2 ! ! crypto ipsec transform-set MY-SET esp-aes 256 esp-sha-hmac ! crypto map CMAP 10 ipsec-isakmp set peer 192.168.1.2 set transform-set MY-SET set pfs group2 match address 101 ! ! ! interface FastEthernet0/0 ip address 192.168.1.3 255.255.255.0 ip nat outside ip virtual-reassembly duplex auto speed auto crypto map CMAP ! interface FastEthernet0/1 ip address 10.11.0.1 255.255.255.0 ip nat inside ip virtual-reassembly duplex auto speed auto ! ip forward-protocol nd ip route 0.0.0.0 0.0.0.0 192.168.1.1 ! ip http server no ip http secure-server ip nat inside source list 100 interface FastEthernet0/0 overload ! access-list 100 deny ip 10.11.0.0 0.0.0.255 10.10.0.0 0.0.0.255 access-list 100 permit ip 10.11.0.0 0.0.0.255 any access-list 101 permit ip 10.11.0.0 0.0.0.255 10.10.0.0 0.0.0.255
Testaaminen
Nostaa yhteys pystyyn ping komennolla R2 mutta lisää sourceksi lähiverkon interface.
ping 10.11.0.1 source fastEthernet 0/1
Aja komento
show crypto session
Joka pitäisi tulostaa IP-ACTIVE (ei pitäisi olla INACTIVE).
Crypto session current status Interface: FastEthernet0/0 Session status: UP-ACTIVE Peer: 192.168.1.3 port 500 IKE SA: local 192.168.1.2/500 remote 192.168.1.3/500 Active IPSEC FLOW: permit ip 10.10.0.0/255.255.255.0 10.11.0.0/255.255.255.0 Active SAs: 2, origin: crypto map
Muita komentoja
show crypto ipsec sa
Mainos / Advertisement: