Page 1 of 1

How to connect to smb-shares via internet

Posted: 07 Jan 2025, 03:36
by Hausmeier
Hi,

I want to access the shared smb-folders via internet, so I opened the smb-port 445 in my fritzbox. But when I enter in windows-explorer : \\dyns-dns (or public ip adress)\folder it won't connect. If I do it within the home-network (\\internal ip or name of the Nas\shared folder) it works fine.

Do I have to open other ports or am I doing something wrong?

Thanks for your help in advance.

Re: How to connect to smb-shares via internet

Posted: 07 Jan 2025, 06:16
by Gremlin
Can you access other services on your network via ddns/public ip? {There may be isp blocking or CGNAT at the isp to take into account}.

Re: How to connect to smb-shares via internet

Posted: 07 Jan 2025, 09:37
by Kevin
Port 445 is a high-risk port commonly targeted by malware and ransomware. Most ISPs block it for security reasons. If you need to use it, I’d recommend setting up a VPN to securely access your services.

Re: How to connect to smb-shares via internet

Posted: 07 Jan 2025, 18:35
by Gremlin
Or use a non-blocked, unused port and forward that at your router to port 445 on the server - so you would access ddns|ip:{chosen_port} --> nas:445
Caveat: every port forwarded carries some risk.

Re: How to connect to smb-shares via internet

Posted: 08 Jan 2025, 00:58
by Hausmeier
Thanks for your replies. Well other Service are accessible. I run a Webserver on a raspi or I also opened up the Port for the emby Server. This all works fine so I don't think the Provider has blocked something

Re: How to connect to smb-shares via internet

Posted: 11 Jan 2025, 00:33
by Hausmeier
I tried to do it with this tutorial

viewtopic.php?t=5997

but when I entered the smb ports in the config file and restarted the smbd service I got the following messages:

Code: Select all

script samba get lock
Restart samba: ERROR: 'ldap admin dn' not defined! Please check your smb.conf
There already is a passdb backend registered with the name NDS_ldapsam!
There already is a passdb backend registered with the name ldapsmbpasswd!
Failed to find entry for user guest.
0
0
I had to remove the smb ports line again because otherwise the samba wouldn't have recognized the nas in the windows explorer anymore. So what can I do?

Please help me - I'm still trying to access the smb shares from outside the home network

Re: How to connect to smb-shares via internet

Posted: 19 Jan 2025, 01:04
by Hausmeier
Is there maybe another Instruktion how to do it as I still have no Club why this doesn't work. I am thankful for All hinter.

Thanks in advance.