Openvpn: ping klappt, Zugriff auf NAS nicht

  • Hallo ihr Experten,


    brauche dringend eure Hilfe. Ich habe Openvpn auf mein Qnap 239 Pro installiert. Genau nach der Anleitung. Es funktioniert auch alles prima..ping von meinem Laptop übers internet zur lokalen IP Adresse des NAS 192.168.0.200 (hinter Router Netgear 192.168.0.1) funktioniert. Aber wenn ich \\192.168.0.200\Freigabe in Windows Explorer auf meinen Laptop eingebe dann geht nichts. Unten stehen die logs auf Server und Client Seite.
    Was mache ich falsch?
    Vielen Dank.


    Client Conf

    Code
    # connect to QNAP OpenVPN Server# Specify that we are a client and that we# will be pulling certain config file directives# from the server.client# Are we connecting to a TCP or# UDP server?  Use the same setting as# on the server.;proto tcpproto udp# Use the same setting as you are using on# the server.# On most systems, the VPN will not function# unless you partially or fully disable# the firewall for the TUN/TAP interface.;dev tapdev tuntls-clientremote meine.dns.org 1194  #  <--- Hier deinen dyndns-account eintragenpull# mtu-Wert festlegen, falls notwendig; tun-mtu xyz# Choose a random host from the remote# list for load-balancing.  Otherwise# try hosts in the order specified.;remote-random# Keep trying indefinitely to resolve the# host name of the OpenVPN server.  Very useful# on machines which are not permanently connected# to the internet such as laptops.resolv-retry infinite# Most clients don't need to bind to# a specific local port number.nobind# Downgrade privileges after initialization (non-Windows only);user nobody;group nobody# Try to preserve some state across restarts.persist-keypersist-tun# Wireless networks often produce a lot# of duplicate packets.  Set this flag# to silence duplicate packet warnings.;mute-replay-warnings# SSL/TLS parms.# See the server config file for more# description.  It's best to use# a separate .crt/.key file pair# for each client.  A single ca# file can be used for all clients# Zertifikate und Schlüssel# Beachte die doppelten \\ in der Pfadangabe für eine windows-configca C:\\Programme\\OpenVPN\\easy-rsa\\keys\\ca.crtcert C:\\Programme\\OpenVPN\\easy-rsa\\keys\\client1.crtkey C:\\Programme\\OpenVPN\\easy-rsa\\keys\\client1.key# Verify server certificate by checking# that the certicate has the nsCertType# field set to "server".  This is an# important precaution to protect against# a potential attack discussed here:#  http://openvpn.net/howto.html#mitm## To use this feature, you will need to generate# your server certificates with the nsCertType# field set to "server".  The build-key-server# script in the easy-rsa folder will do this.;ns-cert-type server# Enable compression on the VPN link.# Don't enable this unless it is also# enabled in the server config file.comp-lzo


    Server Conf

    Code
    # OpenVPN server Konfiguration QNAP NAS# Which TCP/UDP port should OpenVPN listen on?# If you want to run multiple OpenVPN instances# on the same machine, use a different port# number for each one.  You will need to# open up this port on your firewall.port 1194# TCP or UDP server?;proto tcpproto udp# "dev tun" will create a routed IP tunnel,# "dev tap" will create an ethernet tunnel.# Use "dev tap0" if you are ethernet bridging# and have precreated a tap0 virtual interface# and bridged it with your ethernet interface.# If you want to control access policies# over the VPN, you must create firewall# rules for the the TUN/TAP interface.# On non-Windows systems, you can give# an explicit unit number, such as tun0.# On Windows, use "dev-node" for this.# On most systems, the VPN will not function# unless you partially or fully disable# the firewall for the TUN/TAP interface.;dev tapdev tun# Configure server mode and supply a VPN subnet# for OpenVPN to draw client addresses from.# The server will take 10.8.0.1 for itself,# the rest will be made available to clients.# Each client will be able to reach the server# on 10.8.0.1. Comment this line out if you are# ethernet bridging. See the man page for more info.server 10.8.0.0 255.255.255.0# MTU-Werte # mtu-Wert feststellen, falls die Übertragung sehr langsam ist.; mtu-test# mtu Wert festlegen, falls notwendig; tun-mtu xyz  # Push routes to the client to allow it# to reach other private subnets behind# the server.  Remember that these# private subnets will also need# to know to route the OpenVPN client# address pool (10.8.0.0/255.255.255.0)# back to the OpenVPN server.push "route 192.168.0.0 255.255.255.0"   #  <--- Hier die IP des Heimnetzwerks eintragen!# SSL/TLS root certificate (ca), certificate# (cert), and private key (key).  Each client# and the server must have their own cert and# key file.  The server and all clients will# use the same ca file.# See the "easy-rsa" directory for a series# of scripts for generating RSA certificates# and private keys.  Remember to use# a unique Common Name for the server# and each of the client certificates.# Any X509 key management system can be used.# OpenVPN can also use a PKCS #12 formatted key file# (see "pkcs12" directive in man page).ca /opt/etc/openvpn/keys/ca.crtcert /opt/etc/openvpn/keys/server.crtkey /opt/etc/openvpn/keys/server.key# Diffie hellman parameters.# Generate your own with:#   openssl dhparam -out dh1024.pem 1024# Substitute 2048 for 1024 if you are using# 2048 bit keys. dh /opt/etc/openvpn/keys/dh1024.pem# Enable compression on the VPN link.# If you enable it here, you must also# enable it in the client config file.comp-lzo# Uncomment this directive if multiple clients# might connect with the same certificate/key# files or common names.  This is recommended# only for testing purposes.  For production use,# each client should have its own certificate/key# pair.## IF YOU HAVE NOT GENERATED INDIVIDUAL# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,# EACH HAVING ITS OWN UNIQUE "COMMON NAME",# UNCOMMENT THIS LINE OUT.;duplicate-cn# Uncomment this directive to allow different# clients to be able to "see" each other.# By default, clients will only see the server.# To force clients to only see the server, you# will also need to appropriately firewall the# server's TUN/TAP interface.;client-to-client# The keepalive directive causes ping-like# messages to be sent back and forth over# the link so that each side knows when# the other side has gone down.# Ping every 10 seconds, assume that remote# peer is down if no ping received during# a 120 second time period.keepalive 10 120# The persist options will try to avoid# accessing certain resources on restart# that may no longer be accessible because# of the privilege downgrade.persist-keypersist-tun## Meldungen in der Konsole (1-9 möglich. Zur Fehlerbehebung aktivieren); verb 5mute 30  # logging nach 30 gleichen Einträgen einstellen bis zu einer Änderung## Log; status /opt/etc/openvpn/log/status.log; log-append /opt/etc/openvpn/log/openvpn.log# # Run as daemon (Erst aktivieren, wenn alles eingerichtet ist und läuft);daemon## Management Interface über "telnet localhost 7505" zu erreichen



    Client log

    Code
    Wed Apr 07 18:22:23 2010 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct  1 2006Wed Apr 07 18:22:23 2010 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 Apr 07 18:22:23 2010 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.Wed Apr 07 18:22:23 2010 LZO compression initializedWed Apr 07 18:22:23 2010 UDPv4 link local: [undef]Wed Apr 07 18:22:23 2010 UDPv4 link remote: 87.2.180.80:1194Wed Apr 07 18:22:27 2010 [server] Peer Connection Initiated with 87.2.180.80:1194Wed Apr 07 18:22:28 2010 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:3: topology (2.0.9)Wed Apr 07 18:22:28 2010 TAP-WIN32 device [LAN-Verbindung 6] opened: \\.\Global\{9A560C6A-1E83-4558-8BE3-01773BC081E1}.tapWed Apr 07 18:22:28 2010 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.8.0.6/255.255.255.252 on interface {9A560C6A-1E83-4558-8BE3-01773BC081E1} [DHCP-serv: 10.8.0.5, lease-time: 31536000]Wed Apr 07 18:22:28 2010 Successful ARP Flush on interface [4] {9A560C6A-1E83-4558-8BE3-01773BC081E1}Wed Apr 07 18:22:32 2010 Initialization Sequence Completed


    Server log

    Einmal editiert, zuletzt von Terz () aus folgendem Grund: Thema verschoben.

  • Hi, nach welcher Anleitung?


    Sieht für mich so aus als hättest Du Serverseitig eine aktuellere Version als die des Clients. Update den mal. ;)
    Zumindest ist das u.a. der topology "fehler".


    Einstellungsmässig passt das beim server so. Wenn ich mich net verguckt hab.


    Grüsse, David

  • Nö, ich meine Deinen Windows Client :thumb:


    Der wiki artikel ist aber auch net von uns :) Macht aba nix. ;)

  • Iss aber so. ;)
    Den gleichen effekt hättest Du, wenn Du den Client bereit's nach dem 17.10.2006 Heruntergeladen hättest.


    Ich denke, dass Du den OpenVPN GUI for Windows Client nutzt. Der wurde halt das letzte mal am 17.10.2006 aktualisiert und läuft noch unter 2.0.9.

    Zitat

    Latest stable release: 1.0.3 with OpenVPN 2.0.9 (2006-10-17)


    Der Server hat halt schon eine 2.1.x Version, die wesentlich aktueller ist als der Client. Ist halt normalerweise so, dass die Client's Abwärtskompatibel sind aber aufwärts... ;)


    Schaue Dir mal dein Client.log und auf der WebSite des Client's die Version an.
    Denn gerade ab der Version 2.1 (Serverside) hat sich richtig viel getan. ;) Dein Client sollte also mindestens die Version des Servers unterstützen, bestenfalls aktueller sein.


    Grüsse, David

  • Code
    Thu Apr 08 18:50:22 2010 OpenVPN 2.1.1 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Dec 11 2009Thu Apr 08 18:50:22 2010 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.Thu Apr 08 18:50:22 2010 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executablesThu Apr 08 18:50:22 2010 LZO compression initializedThu Apr 08 18:50:23 2010 UDPv4 link local: [undef]Thu Apr 08 18:50:23 2010 UDPv4 link remote: 79.6.184.104:1194Thu Apr 08 18:50:24 2010 [server] Peer Connection Initiated with 79.6.184.104:1194Thu Apr 08 18:50:27 2010 TAP-WIN32 device [LAN-Verbindung 7] opened: \\.\Global\{439C9C63-F33F-47A7-95AD-E1105AE144F0}.tapThu Apr 08 18:50:27 2010 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.8.0.6/255.255.255.252 on interface {439C9C63-F33F-47A7-95AD-E1105AE144F0} [DHCP-serv: 10.8.0.5, lease-time: 31536000]Thu Apr 08 18:50:27 2010 Successful ARP Flush on interface [196612] {439C9C63-F33F-47A7-95AD-E1105AE144F0}Thu Apr 08 18:50:32 2010 Initialization Sequence Completed



    Habe jetzt meinen Client deinstalliert und nochmals installiert. Oben habe ich die beiden logs eingefügt. Zugreifen auf 192.168.0.200 (mein Nas) kann ich aber immer noch nicht....

  • Sieht schon besser aus. ;)


    Scheint so, als würde der push nicht wirklich funktionieren.

    Code
    push "route 192.168.0.0 255.255.255.0"   #  <--- Hier die IP des Heimnetzwerks eintragen!


    Was passier dann, wenn Du die 10.8.0.1 (müsste das eigentlich sein) anpingst?
    Ich denke, es handelt sich bei Dir sogar lediglich nur noch um ein Firewall Problem. (Windows und NAS seitig möglich)


    Stelle dazu mal die Windows Firewall aus, und falls Du auf dem NAS unter Sicherheit irgendwas aktiviert hast, stelle das mal auf:
    Alle Verbindungen zulassen.
    Dann versuche mal vom Client aus den Server anzupingen (nochmal auf die 10.8.0.1 und im 192er Netz, und mal vom Server aus den Client an zu pingen).


    Wenn das Funkt, dann noch mal testen, ob Du auf dem NAS drauf kommst.
    Falls das dann noch nicht funktionieren sollte. Könnte es auch daran liegen, dass Du versehentlich openVPN aus den unstable Paketen installiert hast. Und wenn es das dann sogar nicht ist... Dann kann man noch versuchen die sache einfach etwas anders zu konfiguieren. ;) z.B. einfach als Brigde zu den lokalen DHCP server (server-bridge)...


    Grüsse, David

  • Hallo,


    jetzt klappt...Es hat wohl an den Security Einstellungen vom NAS gelegen. Ich glaube ich muss da auch die IP Adresse vom OPENVPN Server hinzufügen, also die 10.8.0.1, stimmts?

  • Wobei Du da eigentlich auch komplett das 10er netz Freigeben kannst (iss ja eh virtuell)...


    Ich habe das Ding von QNAP aber noch nie genutzt ;)
    Ich vergesse halt immer, das das NAS auch a bissl mit iptables umgehen kann. :D
    Naja, jetzt haste wenigstens mal einen aktuellen Client und es funkt :thumb:


    Grüsse, David

  • ja jetzt habe ich mal 10.8.0.1-10 geöffnet. Und den Windows Firewall wieder geschlossen.


    Vielen Dank Dir. Hast mir sehr geholfen.
    ciao