1x1speed
Goto Top

Zwei IPSEC VPN Client Groups für verschiedene VLANS

Hallo miteinander,

ich hab mal wieder ein spezielles Problem bei dem ich nicht so recht weiter komme. Ich habe einen Cisco 2851 auf dem ich die VPN für User mit dem Cisco VPN-Client und für Site-2-Site VPN zum laufen bekommen hab. Nun brauch ich aber eine zweite Gruppe für VPN-Client User, die wie folgt nur in ein spezielles VLAN dürfen.

VPN-Gruppe1 sollen über IP-Sec-Client ins VLAN 10,20,30,40,50,60 (192.168.1.0/24 - 192.168.6.0/24)
VPN-Gruppe2 sollen über IP-Sec-Client nur ins VLAN 100 (192.168.50.0/24)

Meine aktuelle Config der VPN schaut so aus:


crypto keyring spokes
  pre-shared-key address 0.0.0.0 0.0.0.0 key 6 L2L-key
!
crypto isakmp policy 10
 encr aes 256
 authentication pre-share
 group 2
!
crypto isakmp client configuration group VPN-GROUP-1
 key group1key
 dns 192.168.1.21 
 wins 192.168.1.21
 domain mydomain.local
 pool ippool
 netmask 255.255.255.0
crypto isakmp profile L2L
   description LAN-to-LAN for spoke router(s) connection
   keyring spokes
   match identity address 0.0.0.0
crypto isakmp profile VPNclient
   description VPN clients profile
   match identity group VPN-GROUP-1
   client authentication list userauthen
   isakmp authorization list groupauthor
   client configuration address respond
!
!
crypto ipsec transform-set myset esp-aes 256 esp-sha-hmac
!
crypto dynamic-map dynmap 5
 set transform-set myset
 reverse-route
crypto dynamic-map dynmap 10
 set transform-set myset
 set isakmp-profile L2L
!
!
crypto map mymap 10 ipsec-isakmp dynamic dynmap
!
!
!
!
ip local pool ippool 10.10.0.1 10.10.0.254
!
!
ip access-list extended ACL_NAT
 deny   ip 192.168.0.0 0.0.255.255 10.10.2.0 0.0.0.255
 deny   ip 192.168.0.0 0.0.255.255 10.10.0.0 0.0.0.255
 permit ip 192.168.0.0 0.0.255.255 any
!
dialer-list 1 protocol ip permit
dialer-list 2 protocol ip permit
!
!
!
!
route-map nat_primary permit 10
 match ip address ACL_NAT
 match interface Dialer1

Meine überlegungen dazu sind folgende:

1. eine VPN-Group2 anlegen analog Group1

crypto isakmp client configuration group VPN-GROUP-2
 key group1key
 dns 192.168.5.1 
 pool ippool2
 netmask 255.255.255.0

2. einen zweiten IP-Pool

ip local pool ippool2 10.10.1.1 10.10.1.254

3. eine ACL für die zweite Gruppe, da komm ich grad nicht weiter. Wie muss die ACL ausschauen und vor allem wie wende ich die ACLs dann für die Gruppen auf den Dialer 1 an?


Danke schon mal!

Content-Key: 154585

Url: https://administrator.de/contentid/154585

Printed on: April 23, 2024 at 12:04 o'clock

Member: aqui
aqui Nov 08, 2010 at 17:31:37 (UTC)
Goto Top
Die Frage ist WO die beiden VLANs angelegt sind ?? Wenn sie auf diesem Router selber liegen reicht eine simple ACL ala
access-list 110 permit ip 10.10.1.0 0.0.0.255 192.168.50.0 0.0.0.255
an interface VLAN 100
access-list 110 permit ip 10.10.0.0 0.0.0.255 192.168.0.0 0.0.3.255
an den anderen VLAN Interfaces

Alternativ ginge es mit PBR wenn das Gateway zu den VLANs extern liegt.
access-list 110 permit ip 10.10.1.0 0.0.0.255 192.168.50.0 0.0.0.255
route-map vpngruppe2 permit 10
match ip address 110
set ip next-hop <IP Addresse Gateway>
interface xyz
ip address xyz
ip policy route-map vpngruppe2
Member: 1x1speed
1x1speed Nov 08, 2010 at 19:17:24 (UTC)
Goto Top
Hi Aqui,

danke für Deine Antwort. Die VLANS sind nicht auf dem Router sondern auf zwei L3 Switchen mit HSRP konfiguriert. Das VLAN 100 ist bereits abgegrenzt durch eine ACL die anderen VLANs werden gegenseitig geroutet.
Member: aqui
aqui Nov 09, 2010, updated at Oct 18, 2012 at 16:44:01 (UTC)
Goto Top
OK, dann heisst die goldene Lösung für die PBR wie oben beschrieben. Ist auch einfacher umzusetzen !
Ein ähnliches Beispiel findest du hier:
Cisco Router 2 Gateways für verschiedene Clients
Member: 1x1speed
1x1speed Nov 09, 2010 at 16:35:29 (UTC)
Goto Top
...schönen guten abend,

hab heut in den freien Minuten die VPN Config mit den beiden Gruppen zusammengebastelt. Werd es aber erst testen wenn ich vor Ort bin, bin mir nich so ganz sicher ob es klappt :D

crypto keyring spokes
  pre-shared-key address 0.0.0.0 0.0.0.0 key 6 L2L-key
!
crypto isakmp policy 10
 encr aes 256
 authentication pre-share
 group 2
!
crypto isakmp client configuration group vpngroup01
 key <VPN-GROUP01-KEY>
 dns 192.168.1.21 
 wins 192.168.1.21
 domain mydomain.local
 pool ippool01
 netmask 255.255.255.0
! 
! zusaetzliche Gruppe 
crypto isakmp client configuration group vpngroup02
 key <VPN-GROUP02-KEY>
 dns 192.168.50.1
 pool ippool02
 netmask 255.255.255.0 
!
! 
crypto isakmp profile L2L
   description LAN-to-LAN for spoke router(s) connection
   keyring spokes
   match identity address 0.0.0.0
crypto isakmp profile VPNClientMember
   description VPN clients profile for members access all VLANs
   match identity group vpngroup01
   client authentication list userauthen
   isakmp authorization list groupauthor
   client configuration address respond
crypto isakmp profile VPNClientGuest
   description VPN clients profile for guests access only VLAN 100
   match identity group vpngroup02 
   client authentication list userauthen
   isakmp authorization list groupauthor
   client configuration address respond   
!
ip policy route-map vpngroup02
!
crypto ipsec transform-set myset esp-aes 256 esp-sha-hmac
!
crypto dynamic-map dynmap 5
 set transform-set myset
 reverse-route
crypto dynamic-map dynmap 10
 set transform-set myset
 set isakmp-profile L2L
!
!
crypto map mymap 10 ipsec-isakmp dynamic dynmap
!
!
ip local pool ippool01 10.10.0.1 10.10.0.254
ip local pool ippool02 10.10.1.1 10.10.1.254 
!
!
ip access-list extended ACL_NAT
 deny   ip 192.168.0.0 0.0.255.255 10.10.2.0 0.0.0.255
 deny   ip 192.168.0.0 0.0.255.255 10.10.0.0 0.0.0.255
 permit ip 192.168.0.0 0.0.255.255 any
!
ip access-list extended ACL_NAT_VLAN100 
 permit ip 10.10.1.0 0.0.0.255 192.168.50.0 0.0.255.255
!
dialer-list 1 protocol ip permit
!
!
route-map nat_primary permit 10
 match ip address ACL_NAT
 match interface Dialer1
!
route-map vpngroup02 permit 10
 match ip address ACL_NAT_VLAN100
Member: aqui
aqui Nov 10, 2010 at 07:52:21 (UTC)
Goto Top
Das Kommando
ip policy route-map vpngroup02

fehlt noch auf dem entsprechenden Interface...dann funktioniert es auch face-wink
Member: 1x1speed
1x1speed Nov 30, 2010 at 07:59:19 (UTC)
Goto Top
hi aqui,

hat ein weilchen gedauert bis ich mal zeit hatte an dem bastelprojekt weiter zu machen. ich hab wie folgt die gruppen, ippool, etc. angelegt. die einwahl über die gruppe vpngroup00 funktioniert auch ohne probleme nur greift die rout policy nich wie sie soll. ich hab in der config mal noch die interface des routers mit aufgeführt.

hab ich die rout-map auf das falsche interface gelegt?

crypto isakmp client configuration group vpngroup00
 key <key>
 dns 192.168.60.10
 pool ippool00
 netmask 255.255.255.0
 
crypto isakmp client configuration group vpngroup20
 key <key>
 dns 192.168.60.10
 pool ippool20
 netmask 255.255.255.0
 
ip local pool ippool00 10.10.0.1 10.10.0.254
ip local pool ippool00 10.10.1.1 10.10.1.254
ip local pool ippool20 10.10.2.1 10.10.2.254

no crypto isakmp profile VPNClientGuest
crypto isakmp profile VPNClient00
   description VPN clients profile for guests access only Vlan 100
   match identity group vpngroup00
   client authentication list userauthen
   isakmp authorization list groupauthor
   client configuration address respond
   
crypto isakmp profile VPNClient20
   description VPN clients profile members 
   match identity group vpngroup20
   client authentication list userauthen
   isakmp authorization list groupauthor
   client configuration address respond


ip access-list extended ACL_NAT
 deny   ip 192.168.0.0 0.0.255.255 10.10.0.0 0.0.0.255
 deny   ip 192.168.0.0 0.0.255.255 10.10.1.0 0.0.0.255
 deny   ip 192.168.0.0 0.0.255.255 10.10.2.0 0.0.0.255
 permit ip 192.168.0.0 0.0.255.255 any

ip access-list extended ACL_VLAN100
 permit ip 10.10.0.0 0.0.0.255 192.168.50.0 0.0.0.255

route-map vpngroup100 permit 10
 match ip address ACL_VLAN100
 
route-map nat_backup permit 10
 match ip address ACL_NAT
 match interface Dialer2
!
route-map nat_primary permit 10
 match ip address ACL_NAT
 match interface Dialer1
!
router ospf 1
 router-id ...
 log-adjacency-changes
 auto-cost reference-bandwidth 10000
 area 0 authentication message-digest
 redistribute connected metric-type 1 subnets
 redistribute static metric-type 1 subnets
 passive-interface Dialer1
 passive-interface Dialer2
 passive-interface Loopback0
 network 10.10.0.0 0.0.0.255 area 0
 network 10.10.1.0 0.0.0.255 area 0
 network 10.10.2.0 0.0.0.255 area 0
 network 192.168.5.2 0.0.0.0 area 0
 ...
 default-information originate metric-type 1
! 
interface Loopback0
 description VPN_ROUTER_02
 ip address 192.168.5.2 255.255.255.255
 ip nat inside
 ip virtual-reassembly
!
interface GigabitEthernet0/0
 description Link to VPN2851-R2
 ip address 192.168.5.18 255.255.255.252
 ip nat inside
 ip virtual-reassembly
 ip policy route-map vpngroup100
 ip ospf message-digest-key 1 md5 7 <key>
 duplex full
 speed 1000
!
interface GigabitEthernet0/1
 description Link to Switch-02
 ip address 192.168.5.25 255.255.255.252
 ip nat inside
 ip virtual-reassembly
 ip policy route-map vpngroup100
 ip ospf message-digest-key 1 md5 7 <key>
 duplex full
 speed 1000
 
interface FastEthernet0/3/0
 description DSL1
 switchport access vlan 80
!
interface FastEthernet0/3/1
 description DSL2
 switchport access vlan 81 
 
interface Vlan1
 no ip address
!
interface Vlan80
 description DSL1
 no ip address
 pppoe enable group 1
 pppoe-client dial-pool-number 1
!
interface Vlan81
 description DSL2
 no ip address
 pppoe enable group global
 pppoe-client dial-pool-number 2 
 
interface Dialer1
 description DSL1
 ...
 ip nat outside
 crypto map mymap
 
interface Dialer2
 description DSL2
 ...
 ip nat outside
 crypto map mymap