L2TP over IPSEC: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt)
Zeile 1: Zeile 1:
 
=Server=
 
=Server=
 +
*[[xl2tpd-openswan]]
 +
*[[xl2tpd-strongswan]]
  
−
==Installation==
+
*[[xl2tpd-nat]]
−
apt-get install  xl2tpd ppp openswan
 
−
==Openswan==
 
−
cat /etc/ipsec.conf
 
−
version 2.0
 
−
config setup
 
−
    nat_traversal=yes
 
−
    virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
 
−
    oe=off
 
−
    protostack=netkey
 
−
conn l2tp
 
−
    authby=secret
 
−
    pfs=no
 
−
    auto=add
 
−
    type=transport
 
−
    left=XXX.XXX.XXX.XXX
 
−
    leftprotoport=17/1701
 
−
    right=%any
 
−
    rightprotoport=17/%any
 
  
−
cat /etc/ipsec.secrets
+
=Clients=
−
XXX.XXX.XXX.XXX  %any : PSK "1234"
+
*[[xl2tpd-openswan-client]]
−
==XL2TP==
+
*[[l2tp windows-client]]
−
cat /etc/xl2tpd/xl2tpd.conf
+
*[[l2tp-ubuntu-client]]
−
 
+
*[[network-manager-l2tp]]
−
[global]
 
−
#important when more then one ips on the nic
 
−
#listen-addr = XXX.XXX.XXX.XXX
 
−
 
−
ipsec saref = yes
 
−
debug avp = yes
 
−
debug network = yes
 
−
debug state = yes
 
−
debug tunnel = yes
 
−
 
−
[lns default]
 
−
ip range = 10.1.2.2-10.1.2.255
 
−
local ip = 10.1.2.1
 
−
refuse chap = yes
 
−
refuse pap = yes
 
−
require authentication = yes
 
−
ppp debug = yes
 
−
pppoptfile = /etc/ppp/options.xl2tpd
 
−
length bit = yes
 
−
 
 
−
==PPP==
 
−
cat /etc/ppp/options.xl2tpd
 
−
 
−
require-mschap-v2
 
−
ms-dns 192.168.240.21
 
−
ms-dns 192.168.240.22
 
−
asyncmap 0
 
−
auth
 
−
crtscts
 
−
lock
 
−
hide-password
 
−
modem
 
−
#for ppp3
 
−
unit 3
 
−
debug
 
−
name l2tpd
 
−
proxyarp
 
−
lcp-echo-interval 30
 
−
lcp-echo-failure 4
 
−
 
 
−
cat /etc/ppp/chap-secrets
 
−
 
−
xinux        l2tpd      "geheimes-passwort"       *
 
−
#l2tpd        xinux   "geheimes-passwort"       *
 
−
 
 
−
=Starten=
 
−
/etc/init.d/ipsec restart
 
−
/etc/init.d/xl2tpd restart
 
−
 
 
−
=Client=
 
−
==Installation==
 
−
apt-get install  xl2tpd ppp openswan
 
−
==ipsec==
 
−
cat /etc/ipsec.conf
 
−
version 2.0 # conforms to second version of ipsec.conf specification
 
−
config setup
 
−
dumpdir=/var/run/pluto/
 
−
protostack=netkey
 
−
nat_traversal=yes
 
−
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v6:fd00::/8,%v6:fe80::/10
 
−
oe=off
 
−
       
 
−
conn  yourconn
 
−
authby=secret
 
−
      pfs=no
 
−
      auto=add
 
−
      keyingtries=3
 
−
      dpddelay=30
 
−
      dpdtimeout=120
 
−
      dpdaction=clear
 
−
      rekey=yes
 
−
      ikelifetime=8h
 
−
      keylife=1h
 
−
      type=transport
 
−
      left=%defaultroute
 
−
      leftprotoport=17/1701
 
−
      right=yourvpnserver.com
 
−
      rightprotoport=17/1701
 
−
 
 
−
cat /etc/ipsec.secrets
 
−
%any yourvpnserver.com : PSK "pissespisse"
 
−
==xl2tp==
 
−
cat /etc/xl2tpd/xl2tpd.conf
 
−
[lac vpn-connection]
 
−
lns = yourvpnserver.com
 
−
ppp debug = yes
 
−
pppoptfile = /etc/ppp/options.l2tpd.client
 
−
length bit = yes
 
−
==ppp==
 
−
cat /etc/ppp/options.l2tpd.client
 
−
ipcp-accept-local
 
−
ipcp-accept-remote
 
−
refuse-eap
 
−
require-mschap-v2
 
−
noccp
 
−
noauth
 
−
idle 1800
 
−
mtu 1410
 
−
mru 1410
 
−
defaultroute
 
−
usepeerdns
 
−
debug
 
−
lock
 
−
connect-delay 5000
 
−
name xinux
 
−
password suxer
 
−
 
 
−
==Start Script==
 
−
#!/bin/bash
 
−
  case $1 in
 
−
start)
 
−
  /etc/init.d/ipsec restart
 
−
  sleep 1
 
−
  ipsec auto --up yourconn
 
−
  sleep 1
 
−
  /etc/init.d/xl2tpd start
 
−
  sleep 1
 
−
  echo "c vpn-connection" > /var/run/xl2tpd/l2tp-control
 
−
  sleep 5
 
−
  ip route add 192.168.240.0/21 via 172.28.6.1
 
−
;;
 
−
stop)
 
−
  ip route del 192.168.240.0/21
 
−
  echo "d vpn-connection" > /var/run/xl2tpd/l2tp-control
 
−
  /etc/init.d/xl2tpd stop
 
−
  ipsec auto --down yourconn
 
−
  /etc/init.d/ipsec stop
 
−
;;
 
−
esac
 
−
 
 
−
 
 
−
==Windows Client==
 
−
 
 
−
 
 
−
*-> Startmenü
 
−
*-> Systemsteuerung
 
−
 
 
−
 
 
−
'''(Bei Anzeige: Kategorie)'''
 
−
*:-> Netzwerk und Internet
 
−
*:-> Netzwerkstatus- und Aufgaben anzeigen
 
−
*:-> Neue Verbindung oder neues Netz einrichten
 
−
*:-> Verbindung mit dem Arbeitsplatz herstellen
 
−
*:-> (Nein, eine neue Verbindung erstellen)
 
−
*:-> Die Internetverbindung (VPN) verwenden
 
−
*:-> Internetadresse + Name eingeben
 
−
*:-> "Jetzt nicht verbinden, nur für spätere Verwendung einrichten." auswählen
 
−
*:-> "Weiter" klicken
 
−
*:-> Benutzername + PW und
 
−
*:-> "Dieses Kennwort speichern" auswählen
 
−
*:-> Erstellen
 
−
*:-> Fenster kann geschlossen werden
 
−
*:-> Verbindung mit einem Netzwerk herstellen (die VPN müsste erscheinen)
 
−
*:-> Rechtsklick auf die VPN
 
−
*:-> Eigentschaften
 
−
*:-> Reiter "Netzwerk" auswählen
 
−
*:-> Alles abwählen bis auf "Client für Microsoft-Netzwerke" und "Internetprotokoll Version 4"
 
−
*:-> Reiter "Sicherheit" VPN-Typ: Layer 2 Tunneling Protocol...
 
−
*:-> erweiterte Einstellungen
 
−
*:-> Vorinstallierten Schlüssel verwenden
 
−
*:-> verbinden
 
−
 
 
−
'''VPN-Verbindung dauerhaft freischalten:'''
 
−
Unter: (regedit)
 
−
HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows NT\ CurrentVersion\ Winlogon
 
−
dort ist dem Wert "KeepRasConnections" als Datentyp REG_SZ der Zahlenwert "1" zuzuweisen.
 
  
 
'''Bebilderte Anleitung:'''
 
'''Bebilderte Anleitung:'''
−
*windows 10
 
−
: https://www.cactusvpn.com/tutorials/how-to-set-up-l2tp-vpn-on-windows-10/
 
 
*windows7
 
*windows7
 
: http://www.hideipvpn.com/2010/03/howto-windows-7-ipsecl2tp-vpn-setup-tutorial/
 
: http://www.hideipvpn.com/2010/03/howto-windows-7-ipsecl2tp-vpn-setup-tutorial/
Zeile 206: Zeile 22:
 
*android 2.3
 
*android 2.3
 
: http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/dienste/datennetz_dienste/vpn/doku_vpn_ger_android/document_view
 
: http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/dienste/datennetz_dienste/vpn/doku_vpn_ger_android/document_view
−
*ubuntu
+
 
−
*[[l2tp-ubuntu-client]]
 
  
  

Aktuelle Version vom 7. September 2017, 09:22 Uhr