Remote file access ubuntu using wireguard

Hello, I have replaced my Qnap server with a Ubuntu server.
Remotely I made connection to my Qnap using wireguard on the GLinet AX1800 router.
With Android's X-plore I could access my files remotely.
Now I'm trying to setup the same, with my Ubuntu server to access the smb shares.
My phone connects to the AX1800.
I can access the webserver of the Ubuntu server but I do not have access to the Samba shares.
Can somebody help me to configure smb and the ufw please?

Thank you,


So your phone connects to AX1800 locally, not via vpn, right?

Seems it is just as simple as setting up standard smb.

Have you checked if your smb is running normally?

Does this one help?


My phone connects to the router using VPN. Allow LAN is activated in the router.
When I connect my phone locally, I have no problems opening the SMB server shares on my phone.
I also disabled the firewall of the ubuntu server but still NO connection from the outside.
Also added hosts allow =, in smb.conf, still the same.

In X-plore I get error 'failed to connect to localhost / (port 445) from / (port 48970) after 30000ms

Thank you.

Becaus SMB is not running on localhost/

Pls fill the correct IP or the Ubuntu.


In the Android app I'm making a connection to the IP address of the server.
It is working locally.
Only when I connect to the VPN on the router, it responds with the IP address.