• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[gelöst] VPN-Verbindung zur Uni

ACHTUNG: CROSSPOST!!!!
Anderes Forum, selber Beitrag: http://www.linuxforen.de/forums/showthread.php?p=1696231#post1696231

Hallo,
ich möchte eine VPN Verbindung zur Uni erstellen. Dies scheint auch weitgehend zu funktionieren. Allerdings komme ich nicht auf die gewünschten Seiten, ich komme also auf keine Seite auf die ich kommen sollte.
Die Verbindung wird aber glaube ich aufgebaut. Zumindest bekomme ich eine Ausgabe.
Ich möchte das ganze mit ovpn machen.
Hier mal die Ausgabe, wenn ich die Verbindung starte:
Code:
linux-1h8q:/home/winnetou/Desktop # openvpn student.conf
Wed Feb  4 23:57:45 2009 OpenVPN 2.0.9 i586-suse-linux [SSL] [LZO] [EPOLL] built on Dec  3 2008
Enter Auth Username:mas56570
Enter Auth Password:
Wed Feb  4 23:57:50 2009 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Wed Feb  4 23:57:50 2009 WARNING: file 'student.p12' is group or others accessible
Wed Feb  4 23:57:50 2009 LZO compression initialized
Wed Feb  4 23:57:50 2009 Control Channel MTU parms [ L:1558 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Feb  4 23:57:50 2009 Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:135 ET:0 EL:0 AF:3/1 ]
Wed Feb  4 23:57:50 2009 Local Options hash (VER=V4): '22188c5b'
Wed Feb  4 23:57:50 2009 Expected Remote Options hash (VER=V4): 'a8f55717'
Wed Feb  4 23:57:50 2009 UDPv4 link local: [undef]
Wed Feb  4 23:57:50 2009 UDPv4 link remote: 129.69.90.133:1194
Wed Feb  4 23:57:50 2009 TLS: Initial packet from 129.69.90.133:1194, sid=0a937049 735979dd
Wed Feb  4 23:57:50 2009 VERIFY OK: depth=1, /C=DE/ST=BW/L=Stuttgart/O=Universitaet_Stuttgart/OU=Rechenzentrum/CN=openvpn.rus.uni-stuttgart.de/emailAddress=vpn@rus.uni-stuttgart.de
Wed Feb  4 23:57:50 2009 VERIFY OK: nsCertType=SERVER
Wed Feb  4 23:57:50 2009 VERIFY OK: depth=0, /C=DE/ST=BW/O=Universitaet_Stuttgart/OU=Rechenzentrum/CN=openvpn.rus.uni-stuttgart.de/emailAddress=vpn@rus.uni-stuttgart.de
Wed Feb  4 23:57:50 2009 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Wed Feb  4 23:57:50 2009 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Feb  4 23:57:50 2009 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Wed Feb  4 23:57:50 2009 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed Feb  4 23:57:50 2009 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Wed Feb  4 23:57:50 2009 [openvpn.rus.uni-stuttgart.de] Peer Connection Initiated with 129.69.90.133:1194
Wed Feb  4 23:57:52 2009 SENT CONTROL [openvpn.rus.uni-stuttgart.de]: 'PUSH_REQUEST' (status=1)
Wed Feb  4 23:57:52 2009 PUSH: Received control message: 'PUSH_REPLY,route 141.58.48.1,ping 10,ping-restart 120,route remote_host 255.255.255.255 net_gateway,route 129.69.0.0 255.255.0.0,route 141.58.0.0 255.255.0.0,route 172.16.46.21 255.255.255.255,route 172.16.45.22 255.255.255.255,route 172.16.40.42 255.255.255.255,echo +-------------- important notes --------------+,echo |,echo | - this box will be used to deliver,echo |   important notes to you,echo |,echo +----------------- sincerely your vpn-admin --+,ifconfig 141.58.48.66 141.58.48.65'
Wed Feb  4 23:57:52 2009 ECHO:+-------------- important notes --------------+
Wed Feb  4 23:57:52 2009 ECHO:|
Wed Feb  4 23:57:52 2009 ECHO:| - this box will be used to deliver
Wed Feb  4 23:57:52 2009 ECHO:| important notes to you
Wed Feb  4 23:57:52 2009 ECHO:|
Wed Feb  4 23:57:52 2009 ECHO:+----------------- sincerely your vpn-admin --+
Wed Feb  4 23:57:52 2009 OPTIONS IMPORT: timers and/or timeouts modified
Wed Feb  4 23:57:52 2009 OPTIONS IMPORT: --ifconfig/up options modified
Wed Feb  4 23:57:52 2009 OPTIONS IMPORT: route options modified
Wed Feb  4 23:57:52 2009 OpenVPN ROUTE: net_gateway undefined -- unable to get default gateway from system
Wed Feb  4 23:57:52 2009 OpenVPN ROUTE: failed to parse/resolve route for host/network: remote_host
Wed Feb  4 23:57:52 2009 TUN/TAP device tun0 opened
Wed Feb  4 23:57:52 2009 /bin/ip link set dev tun0 up mtu 1500
Wed Feb  4 23:57:52 2009 /bin/ip addr add dev tun0 local 141.58.48.66 peer 141.58.48.65
Wed Feb  4 23:57:52 2009 /bin/ip route add 141.58.48.1/32 via 141.58.48.65
Wed Feb  4 23:57:52 2009 /bin/ip route add 129.69.0.0/16 via 141.58.48.65
Wed Feb  4 23:57:52 2009 /bin/ip route add 141.58.0.0/16 via 141.58.48.65
Wed Feb  4 23:57:52 2009 /bin/ip route add 172.16.46.21/32 via 141.58.48.65
Wed Feb  4 23:57:52 2009 /bin/ip route add 172.16.45.22/32 via 141.58.48.65
Wed Feb  4 23:57:52 2009 /bin/ip route add 172.16.40.42/32 via 141.58.48.65
Wed Feb  4 23:57:52 2009 Initialization Sequence Completed

Kann es sein, das das ganze an diesen beiden Zeilen hängt, denn das hört sich für mich als Laien nicht so gut an:
Wed Feb 4 23:57:52 2009 OpenVPN ROUTE: net_gateway undefined -- unable to get default gateway from system
Wed Feb 4 23:57:52 2009 OpenVPN ROUTE: failed to parse/resolve route for host/network: remote_host

Was bedeuten diese Zeilen?

Dann noch die Ausgabe von ifconfig bei bestehender Verbindung:

Code:
linux-1h8q:/home/winnetou # ifconfig
dsl0      Link encap:Punkt-zu-Punkt Verbindung
          inet Adresse:85.180.99.155  P-z-P:213.191.89.19  Maske:255.255.255.255
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:17312 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:3
          RX bytes:13415344 (12.7 Mb)  TX bytes:1674801 (1.5 Mb)

lo        Link encap:Lokale Schleife
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:112 errors:0 dropped:0 overruns:0 frame:0
          TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:0
          RX bytes:7688 (7.5 Kb)  TX bytes:7688 (7.5 Kb)

tun0      Link encap:UNSPEC  Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet Adresse:141.58.48.66  P-z-P:141.58.48.65  Maske:255.255.255.255
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:546 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:100
          RX bytes:0 (0.0 b)  TX bytes:362780 (354.2 Kb)

wlan1     Link encap:Ethernet  Hardware Adresse 00:1F:CF:12:77:67
          inet6 Adresse: fe80::21f:cfff:fe12:7767/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17511 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16639 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:1000
          RX bytes:13813637 (13.1 Mb)  TX bytes:2754251 (2.6 Mb)

wmaster0  Link encap:UNSPEC  Hardware Adresse 00-1F-CF-12-77-67-37-36-00-00-00-00-00-00-00-00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Und noch die Ausgabe von route bei bestehender Verbindung:

Code:
linux-1h8q:/home/winnetou # route
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
172.16.45.22    141.58.48.65    255.255.255.255 UGH   0      0        0 tun0
lo1.br11.str.de *               255.255.255.255 UH    0      0        0 dsl0
172.16.40.42    141.58.48.65    255.255.255.255 UGH   0      0        0 tun0
172.16.46.21    141.58.48.65    255.255.255.255 UGH   0      0        0 tun0
141.58.48.65    *               255.255.255.255 UH    0      0        0 tun0
141.58.48.1     141.58.48.65    255.255.255.255 UGH   0      0        0 tun0
141.58.0.0      141.58.48.65    255.255.0.0     UG    0      0        0 tun0
129.69.0.0      141.58.48.65    255.255.0.0     UG    0      0        0 tun0
loopback        *               255.0.0.0       U     0      0        0 lo
default         *               0.0.0.0         U     0      0        0 dsl0

Also jetzt Frage an die Experten: was muss ich machen damit es läuft?

Gruß maxinagl
 
Eigentlich läuft schon alles. Du bekommst die passenden Routen gesetzt, die Verbindung steht. Evtl. könnte es ein DNS Problem sein. Zeig mal die /etc/resolv.conf - welche Fehlermeldung erhälst Du beim Abruf von Uniwebseiten?
 
resolv.conf
Code:
### /etc/resolv.conf file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
#     NETCONFIG_DNS_STATIC_SEARCHLIST
#     NETCONFIG_DNS_STATIC_SERVERS
#     NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
#     NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!
nameserver 213.191.74.19
nameserver 62.109.123.197

Das hier ist meine conf-Datei die ich für openvpn nutze:
Code:
# Kommetarzeichen sind # und ;
# ueblicher Weise werden Kommentare mit # und
# Konfigurationsoptionen mit ; kommentiert


# Windows Nutzer:
#   - sollten diese Datei umbenennen, sodass 
#     die Erweiterung .ovpn ist  
#   - Namen des TAP-Win32 adapters eintragen 
;dev-node MyTap

# Mitarbeiter
;remote openvpn.rus.uni-stuttgart.de 1195
# VPN Server als gateway fuer Netze oder default gateway
;pkcs12 mitarbeiter.p12
;pkcs12 mitarbeiter-defgw.p12

# Studenten
remote openvpn.rus.uni-stuttgart.de 1194
# VPN Server als gateway fuer Netze oder default gateway
pkcs12 student.p12
;pkcs12 student-defgw.p12

# do not change something after this line
dev tun
client
proto udp
resolv-retry infinite
nobind
persist-key

mute-replay-warnings 
ns-cert-type server
cipher AES-256-CBC
comp-lzo
verb 3
mute 20
auth-user-pass

Außerdem gibt es auf der VPN-Seite meiner Uni noch diese conf-Datei:
Code:
# Kommetarzeichen sind # und ;
# ueblicher Weise werden Kommentare mit # und
# Konfigurationsoptionen mit ; kommentiert


# Windows Nutzer:
#   - sollten diese Datei umbenennen, sodass 
#     die Erweiterung .ovpn ist  
#   - Namen des TAP-Win32 adapters eintragen 
;dev-node MyTap

# Mitarbeiter
;remote openvpn.rus.uni-stuttgart.de 1195
# VPN Server als gateway fuer Netze oder default gateway
;pkcs12 mitarbeiter.p12
;pkcs12 mitarbeiter-defgw.p12

# Studenten
remote openvpn.rus.uni-stuttgart.de 1194
# VPN Server als gateway fuer Netze oder default gateway
;pkcs12 student.p12
pkcs12 student-defgw.p12

# do not change something after this line
dev tun
client
proto udp
resolv-retry infinite
nobind
persist-key

mute-replay-warnings 
ns-cert-type server
cipher AES-256-CBC
comp-lzo
verb 3
mute 20
auth-user-pass

Welche von beiden conf-files soll ich nehmen?
Hier ist auch mal der Link zu meiner Uni-How-To Seite, allerdings bringt die mich nicht wirklich weiter. Vielleicht hilft sie euch? https://po2.uni-stuttgart.de/~ruslucas/openvpn-howto/

Eigentlich läuft schon alles. Du bekommst die passenden Routen gesetzt, die Verbindung steht. Evtl. könnte es ein DNS Problem sein. Zeig mal die /etc/resolv.conf - welche Fehlermeldung erhälst Du beim Abruf von Uniwebseiten?
Fehlermeldung erhalte ich keine. Ich komme einfach nicht auf die Seiten. Firefox lädt ewig, aber bringt nichts zustande ;-)
 
Hallo maxinagel,

erst mal toll, daß an Eurer Uni OpenSource unterstützt wird. Hier in Leipzig sperren die sich... Es geht aber trotzdem ;-)

Hast Du es mal über die Proxieinstellungen versucht? -> proxy.ub.uni-stuttgart.de Port 3128
Micha :-D
 
Ich benutze da immer Kvpnc, das funktioniert prima und man kann sehr komfortabel die verschiedenen Verbindungen konfigurieren.
 
blacklips schrieb:
Ich benutze da immer Kvpnc, das funktioniert prima und man kann sehr komfortabel die verschiedenen Verbindungen konfigurieren.
Problem bei kvpnc ist, das wenn ich meine pcf-datei importiere sagt er mir das er keine verbindung herstellen kann. und zertifikate zu importieren klappt nicht. ich würde kvpnc auch bevorzugen, allerdings bekomm ichs nicht hin.
gibt es dazu vielleicht ne anleitung?
folgendes problem habe ich in kvpnc:
ich habe eine readme datei von meiner uni. diese hier:
Certificates required for connecting to the USTUTT VPN

To use the VPN service, you need to import the certificates marked as
mandatory.
Additional, you need to import the certificate associated to your group
(student_cert.crt or mitarbeiter_cert.crt)

The required .pcf-files need to be copied to the profiles folder of your
VPN client.

cacert.crt USTUTT CA - Mandatory to import
intermediatecacert.crt DFN CA - Mandatory to import
mitarbeiter_cert.crt Certificate for employees
README.TXT This file
rootcert.crt ROOT CA - Mandatory to import
student_cert.crt Certificate for students

Externer ISP - Mitarbeiter + Zertifikat (2008v3).pcf
Use this profile to connect to the university as employee.
Externer ISP - Student + Zertifikat (2008v3).pcf
Use this profile to connect to the university as student.
Stadtmitte - Mitarbeiter + Zertifikat (2008v3).pcf
Use this profile to access the WLAN at Stuttgart campus as employee.
Stadtmitte - Student + Zertifikat (2008v3).pcf
Use this profile to access the WLAN at Stuttgart campus as student.
Vaihingen - Mitarbeiter + Zertifikat (2008v3).pcf
Use this profile to access the WLAN at Vaihingen campus as employee.
Vaihingen - Student + Zertifikat (2008v3).pcf
Use this profile to access the WLAN at Vaihingen campus as student.

If you need further assistance, please contact
vpn-support@rus.uni-stuttgart.de

Wenn ich also eine vpn-Verbindung herstellen will, dann geh ich so vor. zuerst starte ich kvpnc, dann wähle ich pcf datei importieren. importiere die datei "Externer ISP - Mitarbeiter + Zertifikat (2008v3).pcf" in kvpnc. das klappt auch, kvpnc sagt mir das alles erfolgreich war.
nächster schritt sind die zertifikate. dann wähle ich profil/zertifikat importieren. dort weiß ich allerdings nicht was ich einstellen soll. was muss ich als importtyp einstellen? was muss ich bei importpaßwort und passphrase eingeben? ich hab dort ein bisschen rumgespielt, das hat aber nie funktioniert. bekomme immer eine fehlermeldung das der import nicht möglich ist. aber laut meiner anleitung muss ich ja "cacert.crt", "intermediatecacert.crt", "rootcert.crt" und "student_cert.crt" importieren.
zumindest wenn ich den cisco klienten unter windows nutze funktionierts so. ich importier dort die pcf-date und dann noch die 4 zertifikate. dann funktioniert alles wunderbar und ich kann auf die uniseiten.

Hallo maxinagel,

erst mal toll, daß an Eurer Uni OpenSource unterstützt wird. Hier in Leipzig sperren die sich... Es geht aber trotzdem ;-)

Hast Du es mal über die Proxieinstellungen versucht? -> proxy.ub.uni-stuttgart.de Port 3128
Micha :-D

Mit dem Proxyserver funktioniert nicht, wenn ich diesen unter firefox einrichte und dann ohne die verbindung zu starten auf uni seiten will sagt er mir das es nicht möglich ist. wenn ich die verbindung starte und dann versuche auf uniinterne seiten zu kommen, lädt er ewig und kommt zu keinem ende.

Also jetzt wieder abschließen nach dem post. was muss ich machen und vorallem welche methode is besser? die mit kvpnc oder die mit openvpn?
 
Bei uns in Erlangen wird auch openvpn eingesetzt, das Gateway wird aber nur mit root-Rechten erstellt. Setze also einfach einmal ein sudo vor den Befehl.
 
rolle schrieb:
Bei uns in Erlangen wird auch openvpn eingesetzt, das Gateway wird aber nur mit root-Rechten erstellt. Setze also einfach einmal ein sudo vor den Befehl.
Nein das hat nichts gebracht. Ich führe den Befehl "openvpn student.conf" immer mit su-Rechten aus. Daran scheint es nicht zu liegen.
 
Der wesentliche Unterschied der beiden Konfigurationsdateien scheint das Gateway zu sein. Du verwendest, wenn ich das richtig verstehe, die VPN-Verbindung nur für Uniseiten. Die andere conf-Datei setzt das Gateway für alles als default. Versuche doch einmal, die andere Zeile zu aktivieren.
 
rolle schrieb:
Der wesentliche Unterschied der beiden Konfigurationsdateien scheint das Gateway zu sein. Du verwendest, wenn ich das richtig verstehe, die VPN-Verbindung nur für Uniseiten. Die andere conf-Datei setzt das Gateway für alles als default. Versuche doch einmal, die andere Zeile zu aktivieren.

Ok habe es jetzt mit der student-defgw.conf versucht. Also hiese hier:
Code:
# Kommetarzeichen sind # und ;
# ueblicher Weise werden Kommentare mit # und
# Konfigurationsoptionen mit ; kommentiert


# Windows Nutzer:
#   - sollten diese Datei umbenennen, sodass 
#     die Erweiterung .ovpn ist  
#   - Namen des TAP-Win32 adapters eintragen 
;dev-node MyTap

# Mitarbeiter
;remote openvpn.rus.uni-stuttgart.de 1195
# VPN Server als gateway fuer Netze oder default gateway
;pkcs12 mitarbeiter.p12
;pkcs12 mitarbeiter-defgw.p12

# Studenten
remote openvpn.rus.uni-stuttgart.de 1194
# VPN Server als gateway fuer Netze oder default gateway
;pkcs12 student.p12
pkcs12 student-defgw.p12

# do not change something after this line
dev tun
client
proto udp
resolv-retry infinite
nobind
persist-key

mute-replay-warnings 
ns-cert-type server
cipher AES-256-CBC
comp-lzo
verb 3
mute 20
auth-user-pass

Der Unterschied liegt ja in dieser Zeile:
# Studenten
remote openvpn.rus.uni-stuttgart.de 1194
# VPN Server als gateway fuer Netze oder default gateway
;pkcs12 student.p12
pkcs12 student-defgw.p12
Hier wird eben das student-defgw.p12 verwendet.
Hast du das gemeint?
Habe es jetzt mit dieser Datei auch probiert. Ausgabe ist:
Code:
linux-1h8q:/home/winnetou/Desktop # sudo openvpn student-defgw.conf
Thu Feb  5 18:15:37 2009 OpenVPN 2.0.9 i586-suse-linux [SSL] [LZO] [EPOLL] built on Dec  3 2008
Enter Auth Username:mas56570
Enter Auth Password:
Thu Feb  5 18:15:42 2009 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA.  OpenVPN 2.0-beta16 and earlier used 5000 as the default port.
Thu Feb  5 18:15:42 2009 WARNING: file 'student-defgw.p12' is group or others accessible
Thu Feb  5 18:15:42 2009 LZO compression initialized
Thu Feb  5 18:15:42 2009 Control Channel MTU parms [ L:1558 D:138 EF:38 EB:0 ET:0 EL:0 ]
Thu Feb  5 18:15:42 2009 Data Channel MTU parms [ L:1558 D:1450 EF:58 EB:135 ET:0 EL:0 AF:3/1 ]
Thu Feb  5 18:15:42 2009 Local Options hash (VER=V4): '22188c5b'
Thu Feb  5 18:15:42 2009 Expected Remote Options hash (VER=V4): 'a8f55717'
Thu Feb  5 18:15:42 2009 UDPv4 link local: [undef]
Thu Feb  5 18:15:42 2009 UDPv4 link remote: 129.69.90.133:1194
Thu Feb  5 18:15:42 2009 TLS: Initial packet from 129.69.90.133:1194, sid=ebb3f271 93a0b80e
Thu Feb  5 18:15:42 2009 VERIFY OK: depth=1, /C=DE/ST=BW/L=Stuttgart/O=Universitaet_Stuttgart/OU=Rechenzentrum/CN=openvpn.rus.uni-stuttgart.de/emailAddress=vpn@rus.uni-stuttgart.de
Thu Feb  5 18:15:42 2009 VERIFY OK: nsCertType=SERVER
Thu Feb  5 18:15:42 2009 VERIFY OK: depth=0, /C=DE/ST=BW/O=Universitaet_Stuttgart/OU=Rechenzentrum/CN=openvpn.rus.uni-stuttgart.de/emailAddress=vpn@rus.uni-stuttgart.de
Thu Feb  5 18:15:43 2009 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Thu Feb  5 18:15:43 2009 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Feb  5 18:15:43 2009 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Thu Feb  5 18:15:43 2009 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Feb  5 18:15:43 2009 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Thu Feb  5 18:15:43 2009 [openvpn.rus.uni-stuttgart.de] Peer Connection Initiated with 129.69.90.133:1194
Thu Feb  5 18:15:44 2009 SENT CONTROL [openvpn.rus.uni-stuttgart.de]: 'PUSH_REQUEST' (status=1)
Thu Feb  5 18:15:44 2009 PUSH: Received control message: 'PUSH_REPLY,route 141.58.48.1,ping 10,ping-restart 120,redirect-gateway def1,echo +-------------- important notes --------------+,echo |,echo |- this box will be used to deliver,echo |   important notes to you,echo |,echo +----------------- sincerely your vpn-admin --+,ifconfig 141.58.50.114 141.58.50.113'
Thu Feb  5 18:15:44 2009 ECHO:+-------------- important notes --------------+
Thu Feb  5 18:15:44 2009 ECHO:|
Thu Feb  5 18:15:44 2009 ECHO:| - this box will be used to deliver
Thu Feb  5 18:15:44 2009 ECHO:| important notes to you
Thu Feb  5 18:15:44 2009 ECHO:|
Thu Feb  5 18:15:44 2009 ECHO:+----------------- sincerely your vpn-admin --+
Thu Feb  5 18:15:44 2009 OPTIONS IMPORT: timers and/or timeouts modified
Thu Feb  5 18:15:44 2009 OPTIONS IMPORT: --ifconfig/up options modified
Thu Feb  5 18:15:44 2009 OPTIONS IMPORT: route options modified
Thu Feb  5 18:15:44 2009 TUN/TAP device tun0 opened
Thu Feb  5 18:15:44 2009 /bin/ip link set dev tun0 up mtu 1500
Thu Feb  5 18:15:44 2009 /bin/ip addr add dev tun0 local 141.58.50.114 peer 141.58.50.113
Thu Feb  5 18:15:44 2009 NOTE: unable to redirect default gateway -- Cannot read current default gateway from system
Thu Feb  5 18:15:44 2009 /bin/ip route add 141.58.48.1/32 via 141.58.50.113
Thu Feb  5 18:15:44 2009 Initialization Sequence Completed

Ergebnis genau gleich. Also kann immernoch nicht auf Uniseiten.
Eine Frage noch. Was bedeutet denn genau diese Zeile hier?
Thu Feb 5 18:15:44 2009 NOTE: unable to redirect default gateway -- Cannot read current default gateway from system

Wenn ich in einem anderen Terminal folgendes eingebe

Code:
tail -f  /var/log/messages

erhalte ich diese Ausgabe, wenn ich den Tunnel aufbaue.

Code:
winnetou@linux-1h8q:~> su
Passwort:
linux-1h8q:/home/winnetou #     tail -f  /var/log/messages
Feb  5 18:18:43 linux-1h8q dhcpcd[3511]: wlan1: timed out
Feb  5 18:18:43 linux-1h8q dhcpcd[3511]: wlan1: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-wlan1.info'
Feb  5 18:18:43 linux-1h8q dhcpcd[3511]: wlan1: broadcasting for a lease
Feb  5 18:19:03 linux-1h8q dhcpcd[3511]: wlan1: timed out
Feb  5 18:19:03 linux-1h8q dhcpcd[3511]: wlan1: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-wlan1.info'
Feb  5 18:19:03 linux-1h8q dhcpcd[3511]: wlan1: broadcasting for a lease
Feb  5 18:19:23 linux-1h8q dhcpcd[3511]: wlan1: timed out
Feb  5 18:19:23 linux-1h8q dhcpcd[3511]: wlan1: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-wlan1.info'
Feb  5 18:19:23 linux-1h8q dhcpcd[3511]: wlan1: broadcasting for a lease
Feb  5 18:19:35 linux-1h8q su: (to root) winnetou on /dev/pts/2
Feb  5 18:19:43 linux-1h8q dhcpcd[3511]: wlan1: timed out
Feb  5 18:19:43 linux-1h8q dhcpcd[3511]: wlan1: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-wlan1.info'
Feb  5 18:19:43 linux-1h8q dhcpcd[3511]: wlan1: broadcasting for a lease
Feb  5 18:19:53 linux-1h8q kernel: tun0: Disabled Privacy Extensions
Feb  5 18:20:03 linux-1h8q dhcpcd[3511]: wlan1: timed out
Feb  5 18:20:03 linux-1h8q dhcpcd[3511]: wlan1: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-wlan1.info'
Feb  5 18:20:03 linux-1h8q dhcpcd[3511]: wlan1: broadcasting for a lease
Feb  5 18:20:23 linux-1h8q dhcpcd[3511]: wlan1: timed out
Feb  5 18:20:23 linux-1h8q dhcpcd[3511]: wlan1: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-wlan1.info'
Feb  5 18:20:23 linux-1h8q dhcpcd[3511]: wlan1: broadcasting for a lease
Feb  5 18:20:43 linux-1h8q dhcpcd[3511]: wlan1: timed out
Feb  5 18:20:43 linux-1h8q dhcpcd[3511]: wlan1: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-wlan1.info'
Feb  5 18:20:43 linux-1h8q dhcpcd[3511]: wlan1: broadcasting for a lease

Vielleicht noch wichtig zu sagen. Ich gehe über dsl0 in das Internet. Also ich muss immer wenn ich online gehen will nach dem start des PCs
Code:
winnetou@linux-1h8q:~> su
Passwort:
linux-1h8q:/home/winnetou # ifup dsl0
    dsl0      name: DSL-Verbindung
interface dsl0 is up
linux-1h8q:/home/winnetou #
eingeben. Erst dann kann ich ins Internet.
Ist das vielleicht der Fehler?

Habe gerade auch nochmal im Internet gelesen und hier diesen Thread gefunden:
http://www.linuxforen.de/forums/showthread.php?t=248085
Dort steht ja, dass die Verbindung steht (wie bei mir) aber der Browser immernoch nicht den Tunnel benutzt. Zumindest verstehe ich das so.
Hab ich das selbe Problem?
Hier mal die Ausgabe von route einmal ohne vpn-Verbindung
Code:
linux-1h8q:/home/winnetou # route
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
lo1.br11.str.de *               255.255.255.255 UH    0      0        0 dsl0
loopback        *               255.0.0.0       U     0      0        0 lo
default         *               0.0.0.0         U     0      0        0 dsl0

und einmal mit der vpn-Verbindung:
Code:
linux-1h8q:/home/winnetou # route
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
lo1.br11.str.de *               255.255.255.255 UH    0      0        0 dsl0
141.58.49.145   *               255.255.255.255 UH    0      0        0 tun0
141.58.48.1     141.58.49.145   255.255.255.255 UGH   0      0        0 tun0
loopback        *               255.0.0.0       U     0      0        0 lo
default         *               0.0.0.0         U     0      0        0 dsl0
linux-1h8q:/home/winnetou #
 
Also bei dir stimmt nach dem Aufbau der VPN Verbindung auch das Defaultgateway nicht. Dass musst du ändern, wie es auf der Seite, deren Link du gepostet hast erklärt ist.
 
spoensche schrieb:
Also bei dir stimmt nach dem Aufbau der VPN Verbindung auch das Defaultgateway nicht. Dass musst du ändern, wie es auf der Seite, deren Link du gepostet hast erklärt ist.

Und wie mach ich das? Aus der Seite werde ich nicht schlau.
Wenn ich die Anleitung in der Seite befolge bekomme ich diese Ausgabe:
Code:
linux-1h8q:/home/winnetou # route
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
lo1.br11.str.de *               255.255.255.255 UH    0      0        0 dsl0
141.58.49.61    *               255.255.255.255 UH    0      0        0 tun0
141.58.48.1     141.58.49.61    255.255.255.255 UGH   0      0        0 tun0
loopback        *               255.0.0.0       U     0      0        0 lo
default         *               0.0.0.0         U     0      0        0 dsl0
linux-1h8q:/home/winnetou # route del default
linux-1h8q:/home/winnetou # route
Kernel IP Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
lo1.br11.str.de *               255.255.255.255 UH    0      0        0 dsl0
141.58.49.61    *               255.255.255.255 UH    0      0        0 tun0
141.58.48.1     141.58.49.61    255.255.255.255 UGH   0      0        0 tun0
loopback        *               255.0.0.0       U     0      0        0 lo
linux-1h8q:/home/winnetou # route add default gw 141.58.48.1 tun0
SIOCADDRT: Kein passender Prozess gefunden

Sprich das letzte Kommando kann ich nicht ausführen. Was mach ich falsch?
 
MaxiNagl schrieb:
spoensche schrieb:
Sprich das letzte Kommando kann ich nicht ausführen. Was mach ich falsch?
Nichts. Sind in Yast die Pakete pptp und pppd installiert?
Sind die Dateien /etc/ppp/peers/vpn und /etc/ppp/chap-secrets erstellt?
Was steht dort drin?

Die Verbindung wird mit dem Kommando (als root angemeldet)
Code:
/user/sbin/pppd call vpn
ausgeführt.

Beendet mit
Code:
killall pptp

Gruß
 
Sind in Yast die Pakete pptp und pppd installiert?
pptp ist installiert. pppd gibt es so nicht, habe nur smpppd gefunden. Das ist installiert.

Sind die Dateien /etc/ppp/peers/vpn und /etc/ppp/chap-secrets erstellt?
Die Datei /etc/ppp/peers/vpn gibt es nicht. Die andere chap-secrets gibt es.

Was steht dort drin?
Code:
linux-1h8q:/etc/ppp # cat chap-secrets
# Secrets for authentication using CHAP
# client        server          secret          IP addresses

# OUTBOUND CONNECTIONS
# Here you should add your PPP Login and PPP password to connect to your
# provider via pap. The * means that the entry(login and passoword may be
# used for ANY host you connect to.
# Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
#hostname       *       password

# PREDIFINED CONNECTIONS
# These are user and password entries for publically accessible call-by-call
# Internet providers in Germany. If they confict with your config, remove them.
# READ_IN_CALLBYCALL_SECRETS

# INBOUND CONNECTIONS
#client         hostname        <password>      192.168.1.1

Die Verbindung wird mit dem Kommando (als root angemeldet)

Code: Alles auswählen
/user/sbin/pppd call vpn

ausgeführt.
Was fange ich damit an? Soll ich das im Terminal eingeben?
Wenn ich das mache bekomme ich diese Ausgabe:
Code:
linux-1h8q:/etc/ppp/peers # /user/sbin/pppd call vpn
bash: /user/sbin/pppd: Datei oder Verzeichnis nicht gefunden
 
pptp ist installiert. pppd gibt es so nicht, habe nur smpppd gefunden. Das ist installiert.
pppd ist der PPP-Dämon. Es ist möglich das PPP-Dämon unter Suse smpppd heißt,
sicher bin ich nicht aber auch bei mir finde ich nicht pppd Paket.
EDIT(Geändert am 13.02.2009) das Paket pppd ist hier falsch. Es soll ppp heißen.

Die Datei /etc/ppp/peers/vpn gibt es nicht. Die andere chap-secrets gibt es.
Die Datei /etc/ppp/peers/vpn kann auch anders heißen, die soll aber in dem Verzeichnis
/etc/ppp/peers/ stehen. Suche eine Datei die so aufgebaut ist:
Code:
pty „/usr/sbin/pptp 192.168.2.1 --nolaunchpppd“
user „hier_soll_dein_PPP-Login-Name_stehen“
require-mppe-128
lock
defaultroute
usepeerdns
Die IP Adresse 192.168.2.1 ist nur ein Beispiel. Hier soll die IP Adresse von VPN-Server stehen.

Die andere chap-secrets gibt es. Es steht aber nichts drin.
Hier soll der Login-Name und das Passwort für die VPN Verbindung stehen. Schreibe das an Ende der Datei dazu:
Code:
# /etc/ppp/chap-secrets
#login name	server	passwort	IP_adresse
„login-name“	  *	 „passwort“	   *
Du sollst hier also den Login-Name und Passwort eintragen.
Wenn ich das mache bekomme ich diese Ausgabe:

Code:
linux-1h8q:/etc/ppp/peers # /user/sbin/pppd call vpn
bash: /user/sbin/pppd: Datei oder Verzeichnis nicht gefunden
dann versuche mit Kommando:
Code:
 /user/sbin/smpppd call vpn
Gruß
 
Die Datei /etc/ppp/peers/vpn kann auch anders heißen, die soll aber in dem Verzeichnis
/etc/ppp/peers/ stehen. Suche eine Datei die so aufgebaut ist:

Code: Alles auswählen
pty „/usr/sbin/pptp 192.168.2.1 --nolaunchpppd“
user „hier_soll_dein_PPP-Login-Name_stehen“
require-mppe-128
lock
defaultroute
usepeerdns

Die IP Adresse 192.168.2.1 ist nur ein Beispiel. Hier soll die IP Adresse von VPN-Server stehen.

Finde keine solche Datei in dem Ordner. Dort sind 6 Dateien drin. Die sehen folgendermaßen aus:
Code:
linux-1h8q:/etc/ppp/peers # cat ppp           
#                                             
# PPP (plain old modem) options               
#                                             
# Plugin passwordfd enables us to pipe the password to pppd, thus we
# don't have to put it into pap-secrets and chap-secrets.           
#                                                                   
plugin passwordfd.so                                                
#                                                                   
noauth                                                              
linux-1h8q:/etc/ppp/peers # cat pppoatm                             
#                                                                   
# PPP over ATM options                                              
#                                                                   
plugin pppoatm.so                                                   
#                                                                   
# Plugin passwordfd enables us to pipe the password to pppd, thus we
# don't have to put it into pap-secrets and chap-secrets.           
#                                                                   
plugin passwordfd.so                                                
#                                                                   
noauth                                                              
linux-1h8q:/etc/ppp/peers # cat pppoe                               
#                                                                   
# PPP over Ethernet options (using roaring pinguin plugin)          
#                                                                   
plugin rp-pppoe.so                                                  
#                                                                   
# Plugin passwordfd enables us to pipe the password to pppd, thus we
# don't have to put it into pap-secrets and chap-secrets.           
#                                                                   
plugin passwordfd.so                                                
#                                                                   
noauth                                                              
# pppoe has a lower mtu/mru                                                                                                                                                                              
mtu 1492                                                                                                                                                                                                 
mru 1492                                                                                                                                                                                                 
# switch off all compressions (this is a must)                                                                                                                                                           
nopcomp                                                                                                                                                                                                  
# this is recommended                                                                                                                                                                                    
novjccomp                                                                                                                                                                                                
noccp
linux-1h8q:/etc/ppp/peers # cat pppoe-rp
#
# PPP over Ethernet options (using roaring pinguin external program)
#
# Plugin passwordfd enables us to pipe the password to pppd, thus we
# don't have to put it into pap-secrets and chap-secrets.
#
plugin passwordfd.so
#
noauth
# pppoe has a lower mtu/mru
mtu 1492
mru 1492
# switch off all compressions (this is a must)
nopcomp
# this is recommended
novjccomp
noccp
linux-1h8q:/etc/ppp/peers # cat pptp
#
# PPTP options
#
# Plugin passwordfd enables us to pipe the password to pppd, thus we
# don't have to put it into pap-secrets and chap-secrets.
#
plugin passwordfd.so
#
noauth
linkname adsl
nocrtscts
local
# switch off all compressions (this is a must)
noaccomp
nopcomp
linux-1h8q:/etc/ppp/peers # cat wvdial
#
# WvDial options
#
# Plugin passwordfd enables us to pipe the password to pppd, thus we
# don't have to put it into pap-secrets and chap-secrets.
#
plugin passwordfd.so
#
noauth
name wvdial
linux-1h8q:/etc/ppp/peers #

Die chap-secrets hab ich jetzt so abgeändert. Stimmt das?
Code:
linux-1h8q:/etc/ppp # cat chap-secrets
# Secrets for authentication using CHAP
# client        server          secret          IP addresses

# OUTBOUND CONNECTIONS
# Here you should add your PPP Login and PPP password to connect to your
# provider via pap. The * means that the entry(login and passoword may be
# used for ANY host you connect to.
# Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
#hostname       *       password
mas56570     *    007      *

# PREDIFINED CONNECTIONS
# These are user and password entries for publically accessible call-by-call
# Internet providers in Germany. If they confict with your config, remove them.
# READ_IN_CALLBYCALL_SECRETS

# INBOUND CONNECTIONS
#client         hostname        <password>      192.168.1.1
Für 007 steht natürlich mein richtiges Passwort drin.

Der Befehl /usr/sbin/smpppd call vpn funktioniert nicht. Ich glaub der heißt bei mir anders. Hab mal bisschen rumgespielt. Vielleicht hilft die Ausgabe weiter.
Code:
linux-1h8q:/home/winnetou/Desktop # /usr/sbin/smpppd call vpn
/usr/sbin/smpppd: unrecognized option `call'
Try `/usr/sbin/smpppd --help' for more information.
linux-1h8q:/home/winnetou/Desktop # /usr/sbin/smpppd smpppd
/usr/sbin/smpppd: unrecognized option `smpppd'
Try `/usr/sbin/smpppd --help' for more information.
linux-1h8q:/home/winnetou/Desktop # /usr/sbin/smpppd --help
SuSE's `smpppd' controls several internet connections (with the help
of `smpppd-ifcfg'). It is not intended for direct use. Use `rcsmpppd'
instead.

      --detach     detach (default)
      --nodetach   nodetach

  -d, --debug      turn on debugging

      --version    show version number
      --help       show this help

See `man smpppd' for even more information.
linux-1h8q:/home/winnetou/Desktop # rcsmpppd --help
Usage: /usr/sbin/rcsmpppd {start|stop|status|try-restart|restart|force-reload|reload}
linux-1h8q:/home/winnetou/Desktop #
 
Das alles bringt uns nicht weiter. Ich glaube wir sind auf dem Holzweg.
In dem ersten Beitrag schreibst Du das Kommando:
linux-1h8q:/home/winnetou/Desktop # openvpn student.conf
Wenn sich bei dir um Open VPN handelt dann ist das die Anlaufstelle http://openvpn.sourceforge.net
Gruß
 
Heinz-Peter schrieb:
Das alles bringt uns nicht weiter. Ich glaube wir sind auf dem Holzweg.
In dem ersten Beitrag schreibst Du das Kommando:
linux-1h8q:/home/winnetou/Desktop # openvpn student.conf
Wenn sich bei dir um Open VPN handelt dann ist das die Anlaufstelle http://openvpn.sourceforge.net
Gruß

Ja es handelt sich um openvpn.
Allerdings komme ich auf der Seite nicht weiter. Schade, dann werde ich wohl unter Linux nie mit vpn glücklich werden.
 
MaxiNagl schrieb:
Ja es handelt sich um openvpn.
Allerdings komme ich auf der Seite nicht weiter. Schade, dann werde ich wohl unter Linux nie mit vpn glücklich werden.
Warum so pessimistisch? Hier werden Probleme gemeinsam gelöst.
Wie ist das Netzwerk aufgebaut? Dein_PC => Access Point => Uni_Server
Gruß
 
Wie ist das Netzwerk aufgebaut? Dein_PC => Access Point => Uni_Server
Netzwerk ist so aufgebaut: habe als Anbieter Alice DSL. Haben einen wlan-Router. Mein PC ist also im wlan. Wenn ich meinen PC starte muss ich "ifup dsl0" eingeben. Der wlan-router ist von Siemens.
Reicht das oder brauchst du noch mehr Infos?

Code:
dsl0      Link encap:Punkt-zu-Punkt Verbindung
          inet Adresse:85.180.99.155  P-z-P:213.191.89.19  Maske:255.255.255.255
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:17312 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:3
          RX bytes:13415344 (12.7 Mb)  TX bytes:1674801 (1.5 Mb)
 
Oben