Issues with OpenVPN and acces to Network // Probleme mit OpenVPN und Netzwerkzugriff

  • ##################################### German version // English version down below ################################################


    Hallo liebe Community,

    ich habe ein Problem, welches ich im Folgenden versuche darzustellen mit allen mir bekannten Informationen. Sollte irgendeine Information fehlen, welche notwendig ist um hier überhaupt weiterhelfen zu können, einfach fragen, ich versuche zu antworten.

    Noch eine Bitte: da ich Anfänger bin (jeder muss mal irgendwo anfangen) bitte ich um klare, verständliche und konstruktive Lösungsvorschläge. Danke schonmal an dieser Stelle.

    Nun zum Thema

    Was ich habe:

    Selbst gebautes NAS mit:

    • Mainboard: ASRock J4105-ITX; Onboard CPU: Intel Celeron J4105; Sockel: So.BGA; Chipsatz: SoC; RAM: Dual Channel-fähig; Netzwerkadapter mit 1000gbit/s
    • RAM: Crucial SO-DIMM 8 GB DDR4-2400 SR Kit (CT2K4G4SFS824A)
    • Festplatte OS: 120GB Crucial BX500 2.5" (6.4cm) SATA 6Gb/s 3D-NAND TLC (CT120BX500SSD1)
    • Festplatte für Daten: 3x 2000GB WD Red WD20EFRX 64MB 3.5" (8.9cm) SATA 6Gb/s
    • Netzteil: 300 Watt be quiet! SFX Power 2 Non-Modular 80+ Bronze
    • Router: Speedport W724V Typ A
    • OS: OpenMedia Vault 4

    Erfahrungen:

    • Mit OMV und Linux: mein erstes Projekt, also blutiger Anfänger
    • Mit Netzwerktechnik allg.: ebenfalls Anfänger Level, habe jedoch beruflich bedingt immer wieder damit zu tun, aber eher oberflächlich.
    • Jeder fängt mal klein an ;)

    Was ich machen will:

    Der Zweck des NAS (fürs erste) ist die Speicherung aller meiner Daten (Büro, Buchhaltung, Versicherungszeug usw., Musik, Bilder/Fotos). Zusätzlich möchte ich jederzeit Zugriff auf diese Daten haben, sei es im LAN oder von extern.
    Als Beispiel: Ich bin bei den Schwiegereltern und möchte die Bilder vom letzten Urlaub zeigen, so sollte dies per Zugriff von extern mit Laptop oder Tablet funktionieren.

    Ich denke, dass sich dafür am besten ein VPN-Zugang eignet.


    Was ich bisher gemacht habe:

    Nachdem ich die Hardware zusammengebaut habe, habe ich das OS (OMV) auf die SSD installiert und schon erste Konfigurationsschritte gemacht (nach diesem Video): https://www.youtube.com/watch?v=NYJCq2FwRUo.

    Dann habe ich gemäß einem weiteren Video (https://www.youtube.com/watch?v=nMthOobE-8g) das OpenVPN-as als Docker Container erstellt/installiert.

    Das Resultat bisher:

    Wenn ich mich außerhalb meines Heimnetzwerkes befinde (bisher nur mit Mobilnetz des Handys per Hotspot getestet) kann ich mich mit den erzeugten Log-In Daten am OpenVPN-Client einwählen/einloggen. Ich habe aber definitiv keinen Zugriff auf die Sharedfolders bzw. die SMB-Freigaben, welche ich auf den NAS erstellt habe (im LAN klappt es). Auch durch die Eingabe der IP mit Port (192.168.x.x:1194) oder die Eingabe der Domains (https://Subdomain/Domain/SMB-Ordner) klappt der Zugriff auf die NAS (Timeout) nicht. Selbst mit der Eingabe der öffentlichen WAN des Routers kann ich nicht auf den Router zugreifen.

    Port 1194 ist im Router weitergeleitet auf die IP des NAS (192.168.x.x). Mit DuckDNS habe ich eine Subdonmain erstellt und so eine DDNS die auf meine öffentliche WAN-Adresse des Routers zeigt. (Also wie im Video von TDL beschreiben).


    Wenn ich mich mit dem OpenVPN-Client verbinde, wird folgende Information angezeigt:

    • You: Hier wird mein Benutzername angezeigt, den ich beim Konfigurieren des Benutzers für OpenVPN erstellt habe
    • Your private IP: 172.27.xxx.x (keine Ahnung woher diese IP kommt)
    • Server: Die DuckDNS Domain
    • Server Public IP: Hier wird die öffentliche WAN Adresse meines Routers angezeigt
    • Port: 1194
    • VPN Protokoll: UDPv4

    Kann es sein, dass ich mit OpenVPN-as ein VPN-Netzwerk erzeuge, in welches ich mich nun anderweitig einwählen muss?

    Aber ich habe ja den OpenVPN-Client erzeugt!?!?

    Wieso taucht nirgend die IP des Servers auf?

    Ich habe nun 3-4 Wochen versucht mir selbst zu helfen, Videos geschaut, Foren gewälzt, ich komme nicht mehr weiter :/:/.

    Ich wäre sehr dankbar um konstruktive Hilfestellung.

    Vielen, vielen Dank schon vorab.


    ##################################### English version ################################################


    Hello dear community

    I have a problem, which I try to describe in the following with all information known to me. If there is any information missing, which is necessary to be able to help here, just ask, I try to answer.

    One more request: since I am a beginner (everybody has to start somewhere) I ask for clear, understandable and constructive suggestions for solutions. Thanks already at this point.

    Now to the topic


    What I have:

    I built my own NAS:

    • Mainboard: ASRock J4105-ITX; Onboard CPU: Intel Celeron J4105; Socket: So.BGA; Chipset: SoC; RAM: Dual Channel capable; Network adapter with 1000gbit/s
    • RAM: Crucial SO-DIMM 8 GB DDR4-2400 SR Kit (CT2K4G4SFS824A)
    • Hard disk OS: 120GB Crucial BX500 2.5" (6.4cm) SATA 6Gb/s 3D-NAND TLC (CT120BX500SSD1)
    • Hard disk for data: 3x 2000GB WD Red WD20EFRX 64MB 3.5" (8.9cm) SATA 6Gb/s
    • Power supply: 300 Watt be quiet! SFX Power 2 Non-Modular 80+ Bronze
    • Router: Speedport W724V Type A
    • OS: OpenMedia Vault 4

    My experience level so far:

    • With OMV and Linux: my first project, i.e. a complete beginner
    • With network technology in general: also beginner level, but due to professional reasons I have to deal with it again and again, but rather superficially.
    • Everybody starts small ;)


    What I want to do:

    The purpose of the NAS (for now) is to store all my data (office, accounting, insurance stuff etc., music, pictures/photos). In addition, I want to have access to this data at any time, be it in the LAN or from outside.

    As an example: I'm at my parents-in-law's house and want to show the pictures from my last holiday, this should be possible via external access with laptop or tablet.

    I think that VPN access is best suited for this.


    What I have done so far:

    After I assembled the hardware, I installed the OS (OMV) on the SSD and already made first configuration steps (after this video): https://www.youtube.com/watch?v=NYJCq2FwRUo

    Then I created/installed the OpenVPN-as as a Docker Container according to another video (https://www.youtube.com/watch?v=nMthOobE-8g).


    The result so far:
    If I am outside of my home network (tested so far only with the mobile network of my mobile phone via hotspot) I can dial/login to the OpenVPN client with the generated log-in data. But I definitely don't have access to the sharedfolders or the SMB shares I created on the NAS (it works in the LAN). Also by entering the IP with port (192.168.x.x:1194) or the domains (https://Subdomain/Domain/SMB-Ordner) the access to the NAS (timeout) does not work. Even by entering the public WAN of the router I cannot access the router.

    Port 1194 in the router is forwarded to the IP of the NAS (192.168.x.x). With DuckDNS I have created a subdonmain and thus a DDNS which points to my public WAN address of the router. (So as described in the video of TDL).


    When I connect to the OpenVPN client the following information is displayed:

    • You: Here you can see my username, which I created when I configured the user for OpenVPN
    • Your private IP: 172.27.xxx.x (no idea where this IP comes from)
    • Server: The DuckDNS Domain
    • Server Public IP: The public WAN address of my router is displayed here
    • Port: 1194
    • VPN protocol: UDPv4

    Is it possible that I create a VPN network with OpenVPN-as, to which I have to dial in otherwise? But I have created the OpenVPN-Client!?!?

    Why doesn't the IP of the server appear anywhere?

    I have tried to help myself for 3-4 weeks, watched videos, browsed forums, I can't get any further. :/:/


    I would be very grateful for constructive help.


    Many, many thanks in advance.


  • Good to see another fellow beginner! I am also new to a lot of this but have recently accomplished what you state are your goals (i.e. "to store all my data (office, accounting, insurance stuff etc., music, pictures/photos). In addition, I want to have access to this data at any time, be it in the LAN or from outside.")


    In my use case, I did not need to access my files remotely very often. So here are the steps I did:


    1) Install Debian 10 via netinstall


    2) Install OMV using the script: https://github.com/OpenMediaVa…-Developers/installScript


    3) Install OpenVPN following this guide: https://www.digitalocean.com/c…envpn-server-on-debian-10

    Note - I did not install it in a Docker container because Docker is 'not compatible' with UFW (universal firewall) rules. I wanted OpenVPN to be subject to my UFW rules so I installed it directly onto Debian OS, not via Docker.


    4) I used something similar Duck DNS to have my dynamic IP mapped to a URL from my router


    5) Installed Nextcloud via Docker following the guide on this forum for how to do this on OMV5.


    With this I now have a situation where my photos are accessible in Nextcloud so I can see them across all my devices.


    If I am not at home / can't access my local network with my VPN I connect and it gives me access to my local network as if I was at home. I can access nextcloud, OMV admin etc. when connected via VPN.


    The downside is that I have to connect via VPN each time I want to add / view my photos in Nextcloud remotely. But this is not frequent in my case so I don't mind. I hope this helps you :)


    I have not tested if I can access SMB files. But I should be able to once connected to VPN.


    Also for your port forwarding you can check here: https://www.portchecktool.com/ - to see if your router is doing it correctly.

  • Hi penguin


    Thank you for your suggestion. I will try that.


    But I still I don't understand, why I have set up an VPN, are able to connect to it, but have no access to nothing.

    Not even to the OMV Webgui.

    What does the stuff really mean: see picture in the enclosure


    A question to the "Your private IP":

    Am I now surfing no with this IP in the www insetad with the external IP address of my router...is that what I did installing OpenVPN-as on OMV/ my NAS...

  • Das Resultat bisher:

    Wenn ich mich außerhalb meines Heimnetzwerkes befinde (bisher nur mit Mobilnetz des Handys per Hotspot getestet) kann ich mich mit den erzeugten Log-In Daten am OpenVPN-Client einwählen/einloggen. Ich habe aber definitiv keinen Zugriff auf die Sharedfolders bzw. die SMB-Freigaben, welche ich auf den NAS erstellt habe (im LAN klappt es).

    Hallo und willkommenim @Para-Skirmisher,


    Ich versuche Dir jetzt eine Antwort zu liefern ob die aber konstruktiv wird musst Du beurteilen ;)


    Also, mit dem VPN Zugang hast Du den wichtigen Schritt gut gemeistert denn Du schreibst dass Du dich einloggen kannst ;)

    Um es einfacher zu machen, dein Handy verbindet sich mit dem PC über verschlüsselten VPN-Tunel, aber das ist nun der erste Schritt.

    Jetzt musst Du am Smartphone einen Programm haben der den Zugriff auf die Freigegebenen Ordner ermöglicht. Ich benutze für diesen Zweck "ES Datei Explorer Pro" (für Android, eine Art Explorers), da klicke ich das Menü "Netzwerk" klicke auf + (Pluszeichen) gebe Die IP-Adresse der Freigabe z.B. 192.168.22.22/meinefregabe, den Benutzernamen für den Freigegebenen Benutzer und einschließend das Passwort, schwupssss kann auf alles zugreifen :)


    Ich hoffe Dir geholfen zu haben ;)

    [LibreELEC @ 2x RPi3, CoreELEC @ S12 Octa Core]

    [ NAS OMV 5.xx (Usul) @ NanoPI M4 ]

    [ Nextcloud 18.0.4 @ ODROID C2 ]

    [ Motioneye @ RPi4]

  • Hallo aux,


    puhh, dann bin ich mal beruhigt, dass der erste Schritt passt:D.

    Heisst also ich habe in meinem Docker Container einen VPN Server laufen.


    Werde das am Handy mal ausprobieren, habe allerdings eij Iphone, aber da findet sich sicher was.


    Vielen Dank schonmal soweit! :thumbup:


    Wie verhält sich das nun am Laptop mit WIN 10?

    Einfach im Explorer <IP-Adresse des Servers>/<FreigegebenerOrdner> eintippen und ich hab Zugriff auf die SMB's?

    Wenn ich über VPN verbunden bin, gebe ich als IP-Adresse des NAS die IP-Adresse an, welche im LAN vergeben wurde oder die vom OpenVPN erzeugte "Your private IP"?

    Habe ich evtl. irgendwelche Settings bei OpenVPN vergessen (siehe Bilder im Anhang).

    Ich frage deshalb, weil es bei mir nicht funktioniert und ich möchte wissen, welches die richtige Eingabe ist um auf das SMB zuzugrifen...


    :/:/

  • Hmm, ich denke - Du brauchst erst einen OpenVPN Klient der die VPN Verbindung zwischen OMV und Windows aufbauen kann, bzw. zwischen iOS und OMV.


    Aber sorry, muss jetzt ins Nest den ich stehe um 4:15 morgens auf ;(

    [LibreELEC @ 2x RPi3, CoreELEC @ S12 Octa Core]

    [ NAS OMV 5.xx (Usul) @ NanoPI M4 ]

    [ Nextcloud 18.0.4 @ ODROID C2 ]

    [ Motioneye @ RPi4]

  • ###################################### German version // English version down below ###################################


    Hallo Zusammen,


    nochmals die Frage:

    Habe ich mit dem OpenVPN-as einen VPN Server erstellt? Ist das das richtige Plug-In um auf den NAS von außerhalb meines Heimnetzwerkes zugreifen zu können, also ist OpenVPN-as dasselbe wie das OpenVPN Plug-In welches ich auch ohne Docker-Container im OMV verwenden kann?


    Es ist ja nun so, dass ich nachdem ich alles im OMV eingerichtet habe und die Portweiterleitung im Router erstellt ist, ich mit "https://<NAS-IP>:943/admin" auf die Einstellungen für das OpenVPN komme und als Admin sämtliche Einstellungen machen kann. Ebenso kann ich dort einen Benutzer konfigurieren. Dann tippe ich "https://<NAS-IP>:943/" in den Browser ein und gelange (nach Eingabe der vorher (als Admin) erstellten Log-In Daten für den Benutzer) auf die Seite wo ich die APP von OpenVP und ein Log-In Profil downloaden kann. Ich installiere diese APP und lade das Profil in die APP, dann kann ich mich verbinden. Das klappt auch soweit.


    Ich habe aber so das Gefühl, dass bei den Einstellungen als Admin mein Fehler liegt. Explizit beim Zuweisen von IP-Adressen an die Benutzer.

    Denn wenn ich mich mit dem Windows-PC über einen Hotspot des Handys (also von außerhalb meines Heimnetzwerkes) mit dem erstellten Benutzer und der Zugehörigen APP von OpenVPN einwähle/verbinde, wird mir dort eine persönliche IP zugewiesen: 172.27.224.x, die im Bereich der VPN-Network-Einstellungen liegt (siehe Bilder im Post oben).


    Kann es sein, dass ich mir aktuell einfach nur eine andere IP-Adresse zuweise, mit welcher ich anstatt mit der meines Routers (Öffentliche WAN-Adresse) im Internet unterwegs bin?

    Sollte ich spezielle IP-Adressen an den OpenVPN-Benutzer vergeben?


    Denn wie gesagt Zugriff auf die OMV Web-Oberfläche, die Shared Folders oder Ähnliches habe ich einfach nicht.


    Weitere Frage:

    Was müsste ich Browser bzw. im Windows-Explorer eingeben um auf die NAS zugreifen zu können?


    Habe:

    - IP-Adresse im LAN des NAS: 192.168.2.xxx (statisch)

    - IP-Adresse des Routers: 192.168.2.1

    - Öffentliche IP-Adresse (im Speedport nennt sich das "öffentliche WAN-Adresse")

    - Portweiterleitung im Router: 1194:1194 1194:1194 192.168.2.xxx (IP-Adresse des NAS)

    - Subdomain bei DuckDNS: xxx.duckdns.org und somit eine Token

    --> Ist dann xxx.duckdns.org meine ddns? oder nur xxx?

    - Domain der NAS (manuell vergeben im OMV)

    - Hostname des NAS (manuell vergeben im OMV)


    Danke und Grüße


    ###################################### English version ###################################



    Hello, everyone,


    again the question:

    Have I created a VPN server with OpenVPN-as? Is this the right plug-in to access the NAS from outside my home network, so OpenVPN-as is the same as the OpenVPN plug-in which I can use without the docker container in OMV?


    Well, after I have set up everything in OMV and the port forwarding is created in the router, I can access the OpenVPN settings with "https://<NAS-IP>:943/admin" and as admin I can make all settings. I can also configure a user there. Then I type "https://<NAS-IP>:943/" into the browser and get (after entering the previously (as admin) created log-in data for the user) to the page where I can download the APP of OpenVP and a log-in profile. I install this APP and load the profile into the APP, then I can connect. This works so far.


    But I have the feeling that the settings as admin are my fault. Explicitly when assigning IP addresses to the users.

    Because if I connect to the Windows PC via a hotspot of the mobile phone (from outside my home network) with the created user and the associated APP of OpenVPN, I will be assigned a personal IP address there: 172.27.224.x, which is within the range of the VPN network settings (see pictures in the post above).


    Is it possible that I am currently simply assigned a different IP address with which I am surfing the Internet instead of my router's (public WAN address)?

    Should I assign a special IP addresses to the OpenVPN user?

    Because as I said, I simply don't have access to the OMV web interface, the shared folders or similar.



    Another question:

    What would I have to enter to the browser or teh Windows Explorer to access the NAS?


    I have:

    - IP address on the LAN of the NAS: 192.168.2.xxx (static)

    - IP address of the router: 192.168.2.1

    - Public IP address (in the Speedport (the Router) this is called "public WAN address")

    - Port forwarding in the router: 1194:1194 1194:1194 192.168.2.xxx (IP address of the NAS)

    - Subdomain at DuckDNS: xxx.duckdns.org and thus a token

    --> Then is xxx.duckdns.org my ddns? Or just xxx?

    - Domain of the NAS (manually assigned in OMV)

    - Host name of the NAS (manually assigned in OMV)


    Thank you and best regards

  • Ich hatte auf Grundlage von diesem Tutorial mein OpenVPN-Server aufgebaut, ich benutze kein OpenVPN über den Docker.

    [LibreELEC @ 2x RPi3, CoreELEC @ S12 Octa Core]

    [ NAS OMV 5.xx (Usul) @ NanoPI M4 ]

    [ Nextcloud 18.0.4 @ ODROID C2 ]

    [ Motioneye @ RPi4]

  • Ok, aber dies ist eine Anleitung für einen PI. Damit kenn ich mal gar net aus.

    Die Anleitung ist zwar für Pi aber ich denke es müsste auch auf dem PC funktionieren.


    Läuft auf dem PI auch Debian bzw. OMV als OS?

    Sowohl auf dem Pi wie auch auf anderen SBC's. Ich bin mit dem NnanoPi M4 sehr zufrieden.

    [LibreELEC @ 2x RPi3, CoreELEC @ S12 Octa Core]

    [ NAS OMV 5.xx (Usul) @ NanoPI M4 ]

    [ Nextcloud 18.0.4 @ ODROID C2 ]

    [ Motioneye @ RPi4]

  • Schau mal, hier ist eine Anleitung für Debian 10

    [LibreELEC @ 2x RPi3, CoreELEC @ S12 Octa Core]

    [ NAS OMV 5.xx (Usul) @ NanoPI M4 ]

    [ Nextcloud 18.0.4 @ ODROID C2 ]

    [ Motioneye @ RPi4]

  • Hallo Aux,

    vielen Dank für den Link. Ich denke dies geanu das was ich die ganze Zeit gesucht hatte, aber (warum auch immer) über Google nicht gefunden habe. Shame on me :S.

    Eine Sache direkt am anfang ist mir aber nciht ganz klar:

    "Wie in den Voraussetzungen erwähnt, wird die Zertifizierungsstelle auf einem eigenständigen Server erstellt. Der Grund für diesen Ansatz ist, dass ein Angreifer, wenn er Ihren Server infiltrieren könnte, auf Ihren privaten CA-Schlüssel zugreifen und ihn zum Signieren neuer Zertifikate verwenden kann, um Zugriff auf Ihr VPN zu erhalten. Dementsprechend kann durch die Verwaltung der Zertifizierungsstelle von einem eigenständigen Computer aus verhindert werden, dass nicht autorisierte Benutzer auf Ihr VPN zugreifen. Beachten Sie auch, dass empfohlen wird, den CA-Server ausgeschaltet zu lassen, wenn Sie ihn nicht zum Signieren von Schlüsseln verwenden, um weitere Vorsichtsmaßnahmen zu treffen."


    Also an sich macht das oben Beschriebene durchaus Sinn, aber einen Extra Server einrichten deshalb...hmm.

    Oder ist damit zum Beisiel eine VM auf dem Server / NAS gemeint?

  • Auf deine frage habe ich (leider) keine Antwort parat.

    Ich bin vor einiger Zeit auf Wireguard umgestiegen denn es ist effizienter und einfacher (meine Meinung nach) zu konfigurieren.

    Ich benutze Wireguard in Verbindung mit Mullvad.

    Hier eine Beispielanleitung für Wireguard, vllt. gefellt Dir das besser.

    [LibreELEC @ 2x RPi3, CoreELEC @ S12 Octa Core]

    [ NAS OMV 5.xx (Usul) @ NanoPI M4 ]

    [ Nextcloud 18.0.4 @ ODROID C2 ]

    [ Motioneye @ RPi4]

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!