Pagina 1 di 1

GRE - IPSEC e VRF

Inviato: lun 24 giu , 2019 11:04 pm
da davide0522
Ciao a tutti.
Ho una configurazione con una sede centrale e due succursali collegate tramite tunnel GRE
Funziona tutto ma essendo GRE non cifrato vorrei implementare un po' di sicurezza,
pertanto ho seguito questa guida qua
http://www.firewall.cx/cisco-technical- ... ipsec.html
(ma ce ne sono altre) ma non mi funziona.
Il problema è che in sede centrale ho il router con configurato il VRF

Sapete aiutarmi su come far funzionare GRE su IPSEC in uno scenario in cui in un endpoint c'è VRF ?
Premetto che su questa parte sono abbastanza acerbo per cui qualche help passo passo è molto apprezzato !
Ringrazio anticipatamente, se serve qualche conf posso postarla

Re: GRE - IPSEC e VRF

Inviato: mer 26 giu , 2019 8:33 am
da paolomat75
Ciao.
Postami la configurazione del hub.

Paolo

Re: GRE - IPSEC e VRF

Inviato: mer 26 giu , 2019 9:05 am
da davide0522
Ciao, allora te la riporto di seguito dove per ragioni di privacy ho mascherato IP e nomi....
Quidi non è proprio cosi :-)
Mi fai sapere se ci capisci qualcosa ?
Se necessario possiamo sentirci anche in privato
Grazie mille

Codice: Seleziona tutto

version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service password-recovery
!
hostname C1803
!
boot-start-marker
boot-end-marker
!
logging buffered 1024000
enable secret 5 ******
!
no aaa new-model
!
!
!
dot11 syslog
ip source-route
!
!
!
!
ip vrf pippo
 rd 253:1
!
ip vrf pluto
 rd 240:1
!
ip vrf paperino
 rd 100:1
 route-target export 100:1
 route-target import 100:1
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
license udi pid CISCO1803/K9 sn ******
archive
 log config
  hidekeys
username ****** password 0 **********
!
!
!
!
!
!
interface Tunnel1
 description * pippo SPA ** TUNNEL SEDE 1
 ip vrf forwarding pippo
 ip address 10.253.1.1 255.255.255.252
 ip tcp adjust-mss 1436
 tunnel source 1.1.1.1
 tunnel destination 10.10.10.10
 tunnel vrf pippo
!
interface Tunnel2
 description * pippo SPA ** TUNNEL SEDE 2
 ip vrf forwarding pippo
 ip address 10.253.129.1 255.255.255.252
 ip flow ingress
 ip tcp adjust-mss 1436
 tunnel source 1.1.1.1
 tunnel destination 10.20.20.20
!
interface Tunnel3
 description * pippo SPA ** TUNNEL SEDE 3
 ip vrf forwarding pippo
 ip address 10.253.130.1 255.255.255.252
 ip flow ingress
 ip tcp adjust-mss 1436
 tunnel source 1.1.1.1
 tunnel destination 10.30.30.30
!
interface Tunnel100
 description * pluto SRL *** TUNNEL TO pluto-sede1
 ip vrf forwarding pluto
 ip address 10.240.0.1 255.255.255.252
 ip mtu 1436
 ip tcp adjust-mss 1436
 tunnel source 1.1.1.1
 tunnel destination 20.10.10.10
!
interface Tunnel101
 description * pluto SRL *** TUNNEL TO pluto-sede2
 ip vrf forwarding pluto
 ip address 10.240.1.1 255.255.255.252
 tunnel source 1.1.1.1
 tunnel destination 20.20.20.20
!
interface Tunnel114
 description * PAPERINO SRL * TUNNEL 114
 ip vrf forwarding paperino
 ip address 4.4.4.45 255.255.255.252
 ip flow ingress
 tunnel source 1.1.1.1
 tunnel destination 30.10.10.10.
!
interface Tunnel115
 description * PAPERINO SRL * TUNNEL 115
 ip vrf forwarding pluto
 ip address 4.4.4.49 255.255.255.252
 tunnel source 1.1.1.1
 tunnel destination 30.20.20.20
!
interface FastEthernet0
 ip address 1.1.1.1 255.255.255.240
 ip nat outside
 ip virtual-reassembly
 speed 100
 full-duplex
!
!
interface FastEthernet3
 description LINK VERSO INFRASTRUTTURA pippo (Switch)
 switchport access vlan 200
 duplex full
 speed 100
!
interface FastEthernet4
 duplex full
!
interface FastEthernet5
 duplex full
 speed 100
!
interface FastEthernet6
 description LINK VMWARE 
 switchport access vlan 81
!
interface FastEthernet7
 description RETE pluto
 switchport access vlan 240
!
!
!
!
interface Vlan81
 description CONNESSIONE-A-paperino-VMWARE
 ip vrf forwarding paperino
 ip address 100.200.200.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
!
interface Vlan200
 description CONNESSIONE-LOCALE-INFRASTRUTTURA-pippo
 ip vrf forwarding pippo
 ip address 10.0.30.2 255.255.255.0
 ip nat inside
 ip virtual-reassembly

!
interface Vlan240
 ip vrf forwarding pluto
 ip address 10.1.1.254 255.255.255.0
!
!
router eigrp 253
 !
 address-family ipv4 vrf pippo 
  redistribute connected
  network 10.253.1.0 0.0.0.3
  network 10.253.4.0 0.0.0.3
  network 10.253.127.0 0.0.0.3
  network 10.253.129.0 0.0.0.3
  network 10.253.130.0 0.0.0.3
  network 10.253.131.0 0.0.0.3
  network 10.253.131.4 0.0.0.3
  network 10.253.140.0 0.0.0.3
  passive-interface default
  no passive-interface Tunnel1
  no passive-interface Tunnel4
  no passive-interface Tunnel2
  no passive-interface Tunnel3
  no passive-interface Tunnel5
  no passive-interface Tunnel6
  no passive-interface Tunnel7
  autonomous-system 253
 exit-address-family
 network 10.253.131.0 0.0.0.3
!
!
router eigrp 240
 !
 address-family ipv4 vrf pluto 
  redistribute connected
  network 10.1.1.0 0.0.0.255
  network 10.240.1.0 0.0.0.3
  passive-interface default
  no passive-interface Tunnel101
  autonomous-system 240
 exit-address-family
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
ip flow-export source Vlan200
ip flow-export version 9
ip flow-export destination 10.0.30.17 2055 vrf pippo
ip flow-export destination 10.0.30.17 2055
!
ip nat inside source list 101 interface Vlan203 vrf pippo overload
ip nat inside source list 102 interface FastEthernet0 vrf paperino overload
ip nat inside source static tcp 100.200.200.1 23 1.1.1.1 23 vrf paperino extendable
ip nat inside source static tcp 10.0.30.77 3389 1.1.1.1 3389 vrf pippo extendable
ip route 0.0.0.0 0.0.0.0 1.1.1.2
!
ip access-list extended pippoWIFI
 permit ip 10.10.1.0 0.0.0.255 any
!
access-list 101 permit ip any any
access-list 102 permit ip any any
!
!
!
!
!
snmp-server community public RO 11
snmp-server enable traps entity
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
 login local
 transport input all
!
end

Re: GRE - IPSEC e VRF

Inviato: mer 26 giu , 2019 11:03 am
da paolomat75
A prima vista non mi sembra un problema.
Stasera faccio una prova con GNS3.

Paolo

P.s. Se non mi senti contattami che mi sono dimenticato :D

Re: GRE - IPSEC e VRF

Inviato: mer 17 lug , 2019 3:55 pm
da davide0522
Ciao, ti sei dimenticato !
:D :D :D :D

Se vuoi ci possiamo sentire in MP. Grazie

Re: GRE - IPSEC e VRF

Inviato: dom 21 lug , 2019 11:22 am
da paolomat75
Ciao.
Ti allego un lab (semplificato funzionante).
Spero che ti sia di aiuto.

Paolo

Codice: Seleziona tutto

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname HUB
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
ip vrf SPK1
!
ip vrf SPK2
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
crypto isakmp policy 10
 encr 3des
 authentication pre-share
crypto isakmp key Cisco address 2.2.2.1
crypto isakmp key Cisco1 address 3.3.3.2
!
!
crypto ipsec transform-set vpn-test esp-3des esp-sha-hmac
!
crypto map vpn-map 10 ipsec-isakmp
 set peer 2.2.2.1
 set peer 3.3.3.2
 set transform-set vpn-test
 match address vpn-acl
!
!
!
!
interface Loopback1
 ip vrf forwarding SPK1
 ip address 11.11.11.11 255.255.255.0
!
interface Loopback2
 ip vrf forwarding SPK2
 ip address 111.111.111.111 255.255.255.0
!
interface Tunnel1
 ip vrf forwarding SPK1
 ip address 12.12.12.1 255.255.255.252
 tunnel source GigabitEthernet1/0
 tunnel destination 2.2.2.1
!
interface Tunnel2
 ip vrf forwarding SPK2
 ip address 13.13.13.1 255.255.255.252
 tunnel source GigabitEthernet1/0
 tunnel destination 3.3.3.2
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface GigabitEthernet1/0
 ip address 1.1.1.1 255.255.255.252
 negotiation auto
 crypto map vpn-map
!
interface Serial2/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 shutdown
 serial restart-delay 0
!
ip route 0.0.0.0 0.0.0.0 1.1.1.2
ip route vrf SPK1 22.22.22.0 255.255.255.0 12.12.12.2
ip route vrf SPK2 33.33.33.0 255.255.255.0 13.13.13.2
!
no ip http server
no ip http secure-server
!
!
!
ip access-list extended vpn-acl
 permit gre any any
no cdp log mismatch duplex
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
!
end

Codice: Seleziona tutto

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SPOKE1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
crypto isakmp policy 10
 encr 3des
 authentication pre-share
crypto isakmp key Cisco address 1.1.1.1
!
!
crypto ipsec transform-set vpn-test esp-3des esp-sha-hmac
!
crypto map vpn-map 10 ipsec-isakmp
 set peer 1.1.1.1
 set transform-set vpn-test
 match address vpn-acl
!
!
!
!
interface Loopback1
 ip address 22.22.22.22 255.255.255.0
!
interface Tunnel1
 ip address 12.12.12.2 255.255.255.252
 tunnel source Serial2/0
 tunnel destination 1.1.1.1
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface GigabitEthernet1/0
 no ip address
 shutdown
 negotiation auto
!
interface Serial2/0
 ip address 2.2.2.1 255.255.255.252
 serial restart-delay 0
 crypto map vpn-map
!
interface Serial2/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 shutdown
 serial restart-delay 0
!
ip route 0.0.0.0 0.0.0.0 2.2.2.2
!
no ip http server
no ip http secure-server
!
!
!
ip access-list extended vpn-acl
 permit gre any any
no cdp log mismatch duplex
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
!
end

Codice: Seleziona tutto

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SPOKE2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
crypto isakmp policy 10
 encr 3des
 authentication pre-share
crypto isakmp key Cisco1 address 1.1.1.1
!
!
crypto ipsec transform-set vpn-test esp-3des esp-sha-hmac
!
crypto map vpn-map 10 ipsec-isakmp
 set peer 1.1.1.1
 set transform-set vpn-test
 match address vpn-acl
!
!
!
!
interface Loopback1
 ip address 33.33.33.33 255.255.255.0
!
interface Tunnel1
 ip address 13.13.13.2 255.255.255.252
 tunnel source Serial2/1
 tunnel destination 1.1.1.1
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
!
interface GigabitEthernet1/0
 no ip address
 shutdown
 negotiation auto
!
interface Serial2/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/1
 ip address 3.3.3.2 255.255.255.252
 serial restart-delay 0
 crypto map vpn-map
!
interface Serial2/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 shutdown
 serial restart-delay 0
!
ip route 0.0.0.0 0.0.0.0 3.3.3.1
!
no ip http server
no ip http secure-server
!
!
!
ip access-list extended vpn-acl
 permit gre any any
no cdp log mismatch duplex
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
 shutdown
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
!
end

Re: GRE - IPSEC e VRF

Inviato: mer 31 lug , 2019 1:05 pm
da paolomat75
Hai risolto?

Paolo

Re: GRE - IPSEC e VRF

Inviato: mer 31 lug , 2019 1:39 pm
da davide0522
Ciao, sono ingabbiato in un progetto che non mi lascia respiro. Se voglio provarlo operativamente sul cliente devo farlo di notte, ma crollo prima :-(((
Spero in agosto di riuscire a metterci le mani. Quindi no, al momento non ho ancora provato....

Re: GRE - IPSEC e VRF

Inviato: mer 31 lug , 2019 2:09 pm
da paolomat75
Ok.

Ero curioso :)

Paolo

Re: GRE - IPSEC e VRF

Inviato: dom 18 ago , 2019 10:06 pm
da davide0522
Buonasera Paolo

Il tuo suggerimento e la tua documentazione hanno funzionato ma ho un problema.

Ovvero: imposto quanto detto su una sede, e funziona, ma nel momento in cui in sede principale applico l'access list all'interfaccia pubblica, per intenderci in questa fase:

Codice: Seleziona tutto

interface GigabitEthernet1/0
 ip address 1.1.1.1 255.255.255.252
 negotiation auto
 crypto map vpn-map

Tutte le altre sedi che ovviamente non ho configurato, vengono sbattute fuori.
Ora la soluzione semplice sarebbe quella di configurare tutte le altre sedi e poi attivare.
Ma il problema è questo:
primo, ho dei vrf che sezionano il router per servire clienti diversi, quindi immagino dovrei farlo su tutti
secondo, già sul cliente su cui mi interessa fare la cosa, in un paio di sedi ho dei router dove quando inserisco i comandi CRYPTO mi da errore, evidentemente infatti hanno firmware ios che non supportando, quindi dovrei aggiornare / sostituirei i router.

E ok, tutto ciò ci sta e posso iniziare a muovermi a fare un piano di upgrade dove necessario.
La domanda è: posso fare una cosa selettiva cioè applicare queste regole solo a determinati tunnel invece che globalmente ?

Perchè ripeto, a meno che io non abbia sbagliato qualche passaggio, nel momento in cui do l'acl sulla pubblica, tutti i tunnel che non sono incapsulati dentro a ipsec defungono...

Grazie mille comunque delle istruzioni, male che vada, come detto, devo aggiornare tutto (peccato perchè un cliente voglio "criptarlo", mentre gli altri, per il tipo di traffico che fanno, anche se in chiaro non interessa nulla nè a me nè a loro.

Grazie mille, ciao !

Re: GRE - IPSEC e VRF

Inviato: lun 19 ago , 2019 8:07 am
da paolomat75
Buongiorno Davide.
Parli di ACL ma credo che ti riferisci alla crypto map. Naturalmente se modifiche la ACL vpn-acl nel hub con il permit del tunnel che vuoi criptare, verrà applicato l'IPSEC solo su quel tunnel.

Paolo

Re: GRE - IPSEC e VRF

Inviato: gio 22 ago , 2019 12:06 pm
da paolomat75
Ci sei riuscito?

Paolo

Re: GRE - IPSEC e VRF

Inviato: lun 09 set , 2019 1:31 pm
da paolomat75
News?

Paolo