Wireguard - OMV 6 Web GUI loads, but can't access shared folder

  • Hello,


    I apologize if this is in the wrong location.


    I have been scouring the internet and this form for a couple of days now, but can't find a solution to my problem.


    I recently set up a raspberry pi 4B (raspberry pi os lite 64 bit bullseye) and installed omv 6 (6.9.8-1 Shaitan) onto it. I attached a hdd, and set up SMB/CIFS and got that working and can access files from different devices on my LAN.


    I went through the process of installing the wireguard plugin and setting up a tunnel and two clients. From one of those clients (a windows 10 laptop connected to my phones hotspot, not my home network), I can connect to the omv web gui via the local ip address of the raspberry pi, but I have no internet access. Going into the Network folder in file explorer, I can see my pi there, but am told windows cannot access \\pi-nas ... the network path was not found with error code error code 0x80070035.


    I have a dynamic ip that i am using duckdns to point to. Whatsmydns and whatsmyip websites all look correct when i check to see that duckdns is working. I have forwarded the correct port (i tried the default 51820 and one separate one both UDP, updating the tunnel config and the client side config each time). The wireguard app on the client side says it is active and gets regular handshakes.


    Through the omv web interface, I have tried changing the SMB share folder public access to each option (No, guests only, and guests allowed), but nothing changed.


    I have also left the wireguard->clients->edit->DNS Servers section on disable.


    From the OMV web gui, here is my tunnel config:

    The bottom one is my laptop's key and ip section. The one above is for my iphone and i have not checked anything with that other than that, yes, I can seemingly activate the connection through the wireguard ios app.



    And also from the web gui, here is my laptops client:

    Code
    [Interface]
    Address = 10.192.1.2/24
    PrivateKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    
    [Peer]
    PublicKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    PresharedKey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Endpoint = MY_SUBDOMAIN.duckdns.org:51820
    
    AllowedIPs = 0.0.0.0/0



    From the wireguard app on my laptop I have:

    Interface

    Listen Port: 56135

    ...

    Peer

    ...

    Allowed IPs: 0.0.0.0/0

    Endpoint: CORRECT_PUBLIC_IP:51820


    I am confused about (1) how I can see the pi folder, but can't access it to even see the shared folder and how I can access the OMV web interface through my laptop (again connected through my phone's hotspot, with a seemingly active wireguard connection) and (2) why I don't have any internet access outside of that OMV web interface.


    Any help is greatly appreciated.

  • KM0201

    Approved the thread.
    • Official Post

    I don't see anything wrong with your configuration, everything seems to be in order. On the other hand, the open ports and domain seem to be well configured as well, this is demonstrated by the fact that you have access to the OMV GUI.


    The shared folder access problem could be related to domain name resolution, so the quick solution could be to access it via IP in Windows File Explorer instead of your server name. That is, in the file explorer you must enter \\192.168.1.50 for example, assuming that this was the IP of the server, adapt it to your case.

    If that works you can try several things to resolve the domain. I don't know if any of these will solve the name resolution problem, but try it.

    1. Add a DNS in the client's Wireguard configuration that points to your router's IP. Simply add a line in the [Interface] section like this DNS = 192.168.1.1 (assuming that is the IP of your router, adapt it to your case)

    2. Activate NetBIOS and try if that solves it. To do this, access the OMV GUI in Services>SMB/CIFS>Settings and in the Advanced Settings section click on Enable NetBIOS.

    If none of that works you will have to settle for accessing via IP unless someone gives you another solution. Domain name resolution is a pending issue in different operating systems, it is not always easy to achieve.


    Regarding your client's internet access, I don't see what the problem could be, the configuration should work as you have it. It seems to me that it is some Windows problem. You can try splitting the tunnel and see if it solves it, it is not a complete solution because you would not be using the tunnel to access the internet but at least you would have access. The connections directed to your local network would go through the Wireguard tunnel, the rest of the connections would go through the standard network interface of your smartphone that the laptop is accessing. To do that you must do it like this:

    - In the client configuration replace the line AllowedIPs = 0.0.0.0/0 with this AllowedIPs = 192.168.1.0/24 (assuming that the range of your local network is that, adapt it to your case)

  • Thank you very much!


    I am able to connect through the ip on both my laptop and iphone now. I have tried on both to connect using the hostname ("\\pi-nas" on windows laptop and "pi-nas" on iPhone), but it doesn't work on either. However, I can connect using the hostname on a locally connected device. Not a big deal, but it might tell you something that I can't figure out. In OMV, the minimum SMB version is set to 2, but I tried it on 3 and that didn't work either, if that helps at all.


    For the internet access problem, your fix worked, and I don't really mind it at all. But i should also mention I had to do the fix on both my laptop and iPhone as my iPhone wasn't able to access the internet either. I hope that helps in some way.


    But thank you for your fixes!!

    • Official Post

    Añadí estos dos problemas a los problemas comunes del documento de wireguard de la wiki.

    omv6:omv6_plugins:wireguard [omv-extras.org]

    omv6:omv6_plugins:wireguard [omv-extras.org]

    Thanks for the feedback :thumbup:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!