L2TP/IPSec am Router zur Anbindung des iPhones
Hallo,
ich möchte mich im mobilen Internet mit meinem iPhone mit meinem
Debian-Router per VPN verbinden. Das Szenario sieht so aus:
iPhone (dynamische IP) --- Internet (DSL) --- (dynamische IP) Debian
Router --- mehrere Subnetze 192.168.X (für WLAN 192.168.4.0, LAN
192.168.1.0)
| |
+----- VPN-Tunnel -------------+
Leider habe ich keine passende deutsche Anleitung für dynamische IP
gefunden. Ich bin nach dieser
http://pleasefeedthegeek.wordpress.com/2012/04/21/l2tp-ubuntu-server-setup-for-ios-clients/
vorgegangen.
Wenn versuche mit dem iphone eine Verbindung herzustellen erhalte ich in
der /var/logZauth.log:
...
Dec 26 10:55:08 micky pluto[28713]: packet from 80.187.96.38:500:
received Vendor ID payload [Dead Peer Detection]
Dec 26 10:55:08 micky pluto[28713]: packet from 80.187.96.38:500:
initial Main Mode message received on 84.57.29.254:500 but no connection
has been authorized with policy=PSK
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
received Vendor ID payload [RFC 3947] method set to=109
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
received Vendor ID payload [draft-ietf-ipsec-nat-t-ike] method set to=110
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
ignoring unknown Vendor ID payload [8f8d83826d246b6fc7a8a6a428c11de8]
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
ignoring unknown Vendor ID payload [439b59f8ba676c4c7737ae22eab8f582]
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
ignoring unknown Vendor ID payload [4d1e0e136deafa34c4f3ea9f02ec7285]
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
ignoring unknown Vendor ID payload [80d0bb3def54565ee84645d4c85ce3ee]
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
ignoring unknown Vendor ID payload [9909b64eed937c6573de52ace952fa6b]
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03] meth=108, but
already using method 110
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02] meth=107, but
already using method 110
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-02_n] meth=106,
but already using method 110
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
ignoring Vendor ID payload [FRAGMENTATION 80000000]
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
received Vendor ID payload [Dead Peer Detection]
Dec 26 10:55:11 micky pluto[28713]: packet from 80.187.96.38:500:
initial Main Mode message received on 84.57.29.254:500 but no connection
has been authorized with policy=PSK
...
Für mich sind derzeit diese Punkte unklar:
1. Was soll mir die Fehlermeldung sagen?
2. Was muss man in der /etc/ipsec.d/l2tp-psk.conf bei den Parametern
left=84.57.0.1 <------- Was kann ich hier eintragen, dass immer
die dyn. Adresse hinterlegt wird?
leftnexthop=192.168.4.254 <----- Stimmt es, dass hier die
lokale IP des Routers hinkommt?
eintragen? Stimmt das so?
3. Was muss man in der /etc/xl2tpd/xl2tpd.conf bei den Parametern
ip range = 192.168.9.1-192.168.9.9 <--- diese IPs werden den
Clients zugewiesen - oder?
local ip = 192.168.9.254 <--- stimmt da so?
eintragen? Stimmt das so?
4. Was muss man in der /etc/ppp/chap-secrets eintragen
"test" l2tpd "testpass" 192.168.9.1 <--- Stimmt das so?
"l2tpd" test "testpass" 192.168.9.1 <--- Stimmt das so?
5. Was muss in der /etc/ipsec.secrets eingetragen werden, dass immer die
dyn. Adresse hinterlegt wird?
84.57.0.1 %any: PSK "TestSecret" <------- Was kann ich hier eintragen,
dass immer die dyn. Adresse hinterlegt wird?
Vielen Dank!
Tony
Hier noch der Vollständigkeit halber die vollständige Konfiguration:
-------> /etc/ipsec.conf
version 2.0 # conforms to second version of ipsec.conf specification
config setup
nat_traversal=yes
virtual_private=%v4:192.168.1.0/24,%v4:192.168.2.0/24,%v4:192.168.4.0/24
oe=off
protostack=netkey
include /etc/ipsec.d/l2tp-psk.conf
-------> /etc/ipsec.d/l2tp-psk.conf
conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK-noNAT
conn L2TP-PSK-noNAT
authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no
ikelifetime=8h
keylife=1h
type=transport
left=84.57.0.1 <------- Was kann ich hier eintragen, dass immer
die dyn. Adresse hinterlegt wird?
leftnexthop=192.168.4.254 <----- Stimmt es, dass hier die
lokale IP des Routers hinkommt?
leftprotoport=17/1701
right=%any
rightprotoport=17/%any
dpddelay=15
dpdtimeout=30
dpdaction=clear
-------> /etc/xl2tpd/xl2tpd.conf
[global]
ipsec saref = yes
[lns default]
ip range = 192.168.9.1-192.168.9.9 <--- diese IPs werden den Clients
zugewiesen - oder?
local ip = 192.168.9.254 <--- stimmt da so?
refuse chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
-------> /etc/ppp/options.xl2tpd
require-mschap-v2
ms-dns 192.168.4.254 <--- hier läuft mein lokaler DNS - stimmt das so?
asyncmap 0
auth
crtscts
lock
hide-password
modem
debug
name l2tpd
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
-------> /etc/ppp/chap-secrets
...
"test" l2tpd "testpass" 192.168.9.1 <--- Stimmt das so?
"l2tpd" test "testpass" 192.168.9.1 <--- Stimmt das so?
-------> /etc/ipsec.secrets
include /var/lib/openswan/ipsec.secrets.inc
84.57.0.1 %any: PSK "TestSecret" <------- Was kann ich hier eintragen,
dass immer die dyn. Adresse hinterlegt wird?
Reply to: