Racoon und L2TP roadwarrior zu Mac OS X Server VPN
Hi
Ich versuche eine VPN-Verbindung zwischen einem Linux-Client und einem Mac OS X Server (Built-In VPN ab 10.6) herzustellen.
Dazu benutze ich racoon, setkey und xl2tp.
Zum Verständnis: Diese Interfaces/IP-Adressen sind relevant:
Folgendes funktioniert schon:
Hier die Logs dazu (falls ich etwas übersehe):
Dann setze ich eine Routing-Option für das neue Netzwerk:
Doch leider klappt dann ein Ping in das VPN-Netzwerk nicht.
Darüber hinaus verschwindet das ppp0-Interface nach ca. 2 min. (ohne ersichtliche Fehlermeldung)
Ich vermute, dass es an den setkey-Einstellungen liegt.
Bis jetzt wird folgendes erlaubt (Dies benötigt xl2tp um überhaupt eine Verbindung herzustellen):
Ich habe auch schon andere Einstellungen versucht, aber ohne Erfolg.
Sieht jemand das Problem?
Wie müssten die setkey-Einstellungen denn richtig aussehen?
Hat jemand Erfahrungen damit?
Ist noch ein Fehler in meinen Überlegungen?
Danke schon mal
Gruß Oli4
Ich versuche eine VPN-Verbindung zwischen einem Linux-Client und einem Mac OS X Server (Built-In VPN ab 10.6) herzustellen.
Dazu benutze ich racoon, setkey und xl2tp.
Zum Verständnis: Diese Interfaces/IP-Adressen sind relevant:
Interface | IP-Adresse | Beschreibung |
---|---|---|
bnep0 | 192.168.20.3 | lokales Interface/IP-Adresse am Client |
91.x.x.x | externe IP-Adresse des Mac OS X VPN-Servers | |
192.168.1.0/24 | (externes) VPN-Netzwerk hinter VPN-Server | |
ppp0 | 192.168.1.138 | IP-Adresse im VPN-Netzwerk, die automatisch vom VPN-Server zugeteilt wird |
Folgendes funktioniert schon:
- Ich kann mit racoon erfolgreich eine IPSEC-Verbindung herstellen.
- Die Anmeldung per L2TP scheint auch zu funktionieren:
- Benutzername/Passwort wird akzeptiert.
- Die PPP-Verbindung wird aufgebaut (interface ppp0 wird lokal erzeugt und erhält eine IP-Adresse im (externen) VPN-Netzwerk vom VPN-Server zugeteilt)
- Im Server-Frontend wird die Verbindung als aufgebaut angezeigt.
Hier die Logs dazu (falls ich etwas übersehe):
Feb 6 18:45:57 oli4snotebook xl2tpd[29807]: Connecting to host 91.x.x.x, port 1701
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: Connection established to 91.x.x.x, 1701. Local: 59247, Remote: 11 (ref=0/0).
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: Calling on tunnel 59247
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: Call established with 91.x.x.x, Local: 10502, Remote: 6544, Serial: 1 (ref=0/0)
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: start_pppd: I'm running:
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "/usr/sbin/pppd"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "passive"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "nodetach"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: ":"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "refuse-pap"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "auth"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "require-chap"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "name"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "username"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "debug"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "file"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "/etc/ppp/options.l2tpd.client"
Feb 6 18:45:58 oli4snotebook xl2tpd[29807]: "/dev/pts/2"
Feb 6 18:45:58 oli4snotebook pppd[29812]: pppd 2.4.4 started by root, uid 0
Feb 6 18:45:58 oli4snotebook pppd[29812]: using channel 5
Feb 6 18:45:58 oli4snotebook pppd[29812]: Using interface ppp0
Feb 6 18:45:58 oli4snotebook pppd[29812]: Connect: ppp0 <--> /dev/pts/2
Feb 6 18:45:58 oli4snotebook pppd[29812]: sent [LCP ConfReq id=0x1 <mru 1410> <asyncmap 0x0> <magic 0x9222e0ac> <pcomp> <accomp>]
Feb 6 18:45:59 oli4snotebook pppd[29812]: rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x28a13086> <pcomp> <accomp>]
Feb 6 18:45:59 oli4snotebook pppd[29812]: sent [LCP ConfAck id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x28a13086> <pcomp> <accomp>]
Feb 6 18:45:59 oli4snotebook pppd[29812]: rcvd [LCP ConfAck id=0x1 <mru 1410> <asyncmap 0x0> <magic 0x9222e0ac> <pcomp> <accomp>]
Feb 6 18:45:59 oli4snotebook pppd[29812]: rcvd [LCP EchoReq id=0x0 magic=0x28a13086]
Feb 6 18:45:59 oli4snotebook pppd[29812]: sent [LCP EchoRep id=0x0 magic=0x9222e0ac]
Feb 6 18:45:59 oli4snotebook pppd[29812]: rcvd [CHAP Challenge id=0x6 <07190d652767310e6453574e3b4c4956>, name = "x.x.x.de"]
Feb 6 18:45:59 oli4snotebook pppd[29812]: sent [CHAP Response id=0x6 <1dda8c5121f7f558b5f1b854bab64a590000000000000000f8c3c2e9e41ed830e7b1e76b823a576ed5784529a1a858ba00>, name = "username"]
Feb 6 18:46:00 oli4snotebook pppd[29812]: rcvd [CHAP Success id=0x6 "S=6FB281EB2F457364E4D3C0D9D48DFF039457A620 M=Access granted"]
Feb 6 18:46:00 oli4snotebook pppd[29812]: CHAP authentication succeeded
Feb 6 18:46:00 oli4snotebook pppd[29812]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0>]
Feb 6 18:46:00 oli4snotebook pppd[29812]: rcvd [IPCP ConfReq id=0x1 <addr 91.x.x.x>]
Feb 6 18:46:00 oli4snotebook pppd[29812]: sent [IPCP ConfAck id=0x1 <addr 91.x.x.x>]
Feb 6 18:46:00 oli4snotebook pppd[29812]: rcvd [proto=0x8235] 01 01 00 04
Feb 6 18:46:00 oli4snotebook pppd[29812]: Unsupported protocol 'Apple Client Server Protocol Control' (0x8235) received
Feb 6 18:46:00 oli4snotebook pppd[29812]: sent [LCP ProtRej id=0x2 82 35 01 01 00 04]
Feb 6 18:46:00 oli4snotebook pppd[29812]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
Feb 6 18:46:00 oli4snotebook pppd[29812]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0>]
Feb 6 18:46:01 oli4snotebook pppd[29812]: rcvd [IPCP ConfNak id=0x2 <addr 192.168.1.138>]
Feb 6 18:46:01 oli4snotebook pppd[29812]: sent [IPCP ConfReq id=0x3 <addr 192.168.1.138>]
Feb 6 18:46:01 oli4snotebook pppd[29812]: rcvd [IPCP ConfAck id=0x3 <addr 192.168.1.138>]
Feb 6 18:46:01 oli4snotebook pppd[29812]: local IP address 192.168.1.138
Feb 6 18:46:01 oli4snotebook pppd[29812]: remote IP address 91.x.x.x
Feb 6 18:46:01 oli4snotebook pppd[29812]: Script /etc/ppp/ip-up started (pid 29815)
Feb 6 18:46:01 oli4snotebook pppd[29812]: Script /etc/ppp/ip-up finished (pid 29815), status = 0x0
Dann setze ich eine Routing-Option für das neue Netzwerk:
ip route add 192.168.1.0/24 dev ppp0
Doch leider klappt dann ein Ping in das VPN-Netzwerk nicht.
Darüber hinaus verschwindet das ppp0-Interface nach ca. 2 min. (ohne ersichtliche Fehlermeldung)
Ich vermute, dass es an den setkey-Einstellungen liegt.
Bis jetzt wird folgendes erlaubt (Dies benötigt xl2tp um überhaupt eine Verbindung herzustellen):
echo "
spdadd 192.168.20.3[1701] 91.x.x.x[1701] udp
-P out ipsec esp/transport//require;
spdadd 91.x.x.x[1701] 192.168.20.3[1701] udp
-P in ipsec esp/transport//require;
" | setkey -c
Ich habe auch schon andere Einstellungen versucht, aber ohne Erfolg.
Sieht jemand das Problem?
Wie müssten die setkey-Einstellungen denn richtig aussehen?
Hat jemand Erfahrungen damit?
Ist noch ein Fehler in meinen Überlegungen?
Danke schon mal
Gruß Oli4
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 135853
Url: https://administrator.de/forum/racoon-und-l2tp-roadwarrior-zu-mac-os-x-server-vpn-135853.html
Ausgedruckt am: 29.04.2025 um 15:04 Uhr
3 Kommentare
Neuester Kommentar
Dein VPN IP Adressdesign ist nicht gerade intelligent mit dem 192.168.1.0er Allweltsnetz ! Damit wirst du über kurz oder lang schnell Schiffbruch erleiden...siehe hier:
VPNs einrichten mit PPTP
Es ist möglich das es auch daran liegt sofern dein Client sich in dem IP netz befindet.
Bist du dir ansonsten sicher das der Server L2TP macht als VPN Protokoll und nicht Standard IPsec mit ESP ??
VPNs einrichten mit PPTP
Es ist möglich das es auch daran liegt sofern dein Client sich in dem IP netz befindet.
Bist du dir ansonsten sicher das der Server L2TP macht als VPN Protokoll und nicht Standard IPsec mit ESP ??
Die Racoon SW ist aber ein nativer IPsec Client. Er kommt auch in der Monowall und PFsense zum Einsatz:
IPsec VPNs einrichten mit Cisco, Mikrotik, pfSense Firewall, FritzBox, Smartphone sowie Shrew Client Software
Vielleicht hilft dir ja das noch weiter...
http://www.jacco2.dds.nl/networking/openswan-macosx.html
http://www.spenneberg.com/6772.html
Sieht aber danach doch so aus als ob Racoon L2TP supportet....
IPsec VPNs einrichten mit Cisco, Mikrotik, pfSense Firewall, FritzBox, Smartphone sowie Shrew Client Software
Vielleicht hilft dir ja das noch weiter...
http://www.jacco2.dds.nl/networking/openswan-macosx.html
http://www.spenneberg.com/6772.html
Sieht aber danach doch so aus als ob Racoon L2TP supportet....