How can I access my Samba share from outside the network ? Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
LeVraiRoiDHyrule
Posts: 18
Joined: Tue Apr 28, 2020 3:00 pm

How can I access my Samba share from outside the network ?

Post by LeVraiRoiDHyrule »

Hi,

I use SMB/Samba file share on my Pi to access the data stored on my HDD plugged in the Pi. It works very well.
But right now I can only access the file server on the same network as the pi.

How can I access it from the outside ?
I already have a DDNS. I tried to find what port SMB uses, but I always get a different answer. What port should I open ? Is there something more I should do ?

Thanks in advance for your help.
Have a great day.
User avatar
Joulinar
Posts: 2077
Joined: Sat Nov 16, 2019 12:49 am

Re: How can I access my Samba share from outside the network ?

Post by Joulinar »

Hi,

many thanks for your request. Theoretically Port 445 TCP should be enough. But do you relay want to open SMB port towards internet? Personally I would not do that. Why not using a VPN to connect from outside world to your RPi back home? It would be much more safer :)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
LeVraiRoiDHyrule
Posts: 18
Joined: Tue Apr 28, 2020 3:00 pm

Re: How can I access my Samba share from outside the network ?

Post by LeVraiRoiDHyrule »

Joulinar wrote: Mon Jun 15, 2020 9:42 am Hi,

many thanks for your request. Theoretically Port 445 TCP should be enough. But do you relay want to open SMB port towards internet? Personally I would not do that. Why not using a VPN to connect from outside world to your RPi back home? It would be much more safer :)
Thanks a lot for your answer. It works : opening port 445 makes it work outside the network. I had so much different answers elsewhere.
That's the 2nd time you're helping me for SMB, so thanks again !

Yes I know opening too much ports is not ideal. I already have Pivpn with Wireguard, which is what I was using to access SMB from the outside. But now I have the need to access both my SMB from outside, plus other devices on the same network as me. At the same time. So VPN was a bit of a hassle for this.

Thanks again and have a good day !
User avatar
Joulinar
Posts: 2077
Joined: Sat Nov 16, 2019 12:49 am

Re: How can I access my Samba share from outside the network ?

Post by Joulinar »

I'm using WireGuard since the beginning and for me it's perfect solution. I installed the client on all my devices such as laptop, mobiles and tablets. Once I'm outside my home, I can connect to any device in my local network as well as using ad-blocking via my PiHole.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply