mayjalin
Goto Top

Anbindung eines iPhone an einen Cisco Router mit dynamischer ISP Adressse via IPSec VPN über den iPhone Cisco Client

Hallo,

hier ist eine Konfiguration eines Routers, der IPSec zu einem iPhone schaft. Das iPhone wird in diesem Beispiel mit einem DynDNS Namen konfiguriert, der mit einem DynDNS Client auf einem Client im LAN aktuallisiert wird.
aaa new-model
!
aaa authentication enable default group tacacs+ enable
aaa authorization network CRYPTO_ISAKMP_CLIENT local
!
username {MyUsername} secret {MySecret}
!
crypto logging session
!
crypto isakmp policy 1
encr aes 256
authentication pre-share
group 2
lifetime 3600
crypto isakmp keepalive 10
crypto isakmp nat keepalive 20
crypto isakmp xauth timeout 90
!
crypto isakmp client configuration group CRYPTO_ISAKMP_CLIENT
key {MyVpnKey}
dns {MyInternalDNS}
domain {MyInternalDomainName}
pool VPN-POOL
save-password
!
crypto ipsec security-association lifetime seconds 86400
crypto ipsec security-association idle-time 3600
!
crypto ipsec transform-set VPN-TRANSFORMSET esp-aes 256 esp-sha-hmac
!
crypto dynamic-map CRYPTO_ISAKMP_CLIENT 1
set transform-set VPN-TRANSFORMSET
reverse-route
!
crypto map STATIC_CRYPTO_MAP local-address Dialer0
crypto map STATIC_CRYPTO_MAP client authentication list CRYPTO_ISAKMP_CLIENT
crypto map STATIC_CRYPTO_MAP isakmp authorization list CRYPTO_ISAKMP_CLIENT
crypto map STATIC_CRYPTO_MAP client configuration address respond
crypto map STATIC_CRYPTO_MAP 1 ipsec-isakmp dynamic CRYPTO_ISAKMP_CLIENT
!
interface Vlan{MyVlanId}
ip address {MyInternalIpAddress} {MyInternalSubnetmask}
ip nat inside
ip virtual-reassembly
ip tcp adjust-mss 1412
!
interface Dialer0
description "-> WAN"  
ip access-group 101 in
ip address negotiated1
ip mtu 1452
ip nat outside
ip virtual-reassembly
encapsulation ppp
dialer pool 1
dialer-group 1
ppp authentication chap callin
ppp chap hostname {MyProviderUsername}
ppp chap password {MyProviderPassowrd}
crypto map STATIC_CRYPTO_MAP
!
ip local pool VPN-POOL 10.0.0.250 10.0.0.254
!
ip route 0.0.0.0 0.0.0.0 Dialer0
!
ip nat inside source list 1 interface Dialer0 overload
!
access-list 1 permit {MyInternalNetwork} {MyInternalWildCard}
access-list 101 remark ---> Internet LAN
access-list 101 permit icmp any any echo-reply
access-list 101 permit icmp any any time-exceeded
access-list 101 permit icmp any any unreachable
access-list 101 permit udp any any eq isakmp
access-list 101 permit udp any any eq non500-isakmp
access-list 101 deny icmp any any
access-list 101 deny ip 10.0.0.0 0.255.255.255 any
access-list 101 deny ip 172.16.0.0 0.15.255.255 any
access-list 101 deny ip 192.168.0.0 0.0.255.255 any
access-list 101 deny ip 127.0.0.0 0.255.255.255 any
access-list 101 deny ip host 255.255.255.255 any
access-list 101 deny ip host 0.0.0.0 any
access-list 101 deny ip any any
!
dialer-list 1 protocol ip permit

Content-Key: 197412

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

Printed on: April 18, 2024 at 06:04 o'clock

Member: aqui
aqui Jan 24, 2013, updated at Jan 08, 2022 at 19:18:36 (UTC)
Goto Top
Kleine kosmetische Konfig Korrektur:
Bei Dialer Interfaces sollte man möglichst vermeiden ip route 0.0.0.0 0.0.0.0 Dialer0 zu nutzen, denn das nagelt die Route auf ein statisches Interface. PPPoE (oder andere Dial Protokolle) nutzt aber immer ein virtuelles dynamisches Interface !
Besser also die default Route auch dynmaisch mit dem Interface zu wechseln indem man die obige statische Route sinnvoller mit:
ppp ipcp route default
unter dem Dialer Interface ersetzt !
Beispiel siehe hier:
Cisco 880, 890 und ISR Router Konfiguration mit xDSL, Kabel oder FTTH Anschluss plus VPN und IP-TV
Member: mayjalin
mayjalin Jan 24, 2013 at 20:40:08 (UTC)
Goto Top
Hallo aqui,

ansich ist es ein guter Ansatz den Du bringst. Aber leider wird dies in meiner IOS Version leider nicht unterstützt, daher habe ich die statische Route gesetzt und die dyn. Route zum VPN Client, die auto. bei der Einwahl erzeugt wird, zieht in diesem Fall vor der default Router.
Member: aqui
aqui Jan 25, 2013 at 20:42:32 (UTC)
Goto Top
Kann eigentlich nicht sein ?! Ist in den letzten 10 Jahren ! in jedem IOS implemetiert das PPP supportet. Sollte also auch bei dir der Fall sein ?!