I will preface by saying that using SAMBA over the Internet is just a bad idea. There are far better ways to access your data from outside the LAN, like SFTP.
But, SAMBA uses port 445, so you need to configure things to use port 445, such as opening the port on your router and forwarding to the SAMBA server. I do not believe it is something you can do with an nginx proxy since SAMBA is not http(s), obviously, and nginix just serves http(s). You can stream ssh with ngnix, but I don't think it will do that with SAMBA.
Your best way is to use a VPN or, at a minimum, configure the SAMBA server to use smb min protocol = SMB3_02 and smb encrypt = required. But, again, I would never say using SAMBA via the Internet is a good idea or good practice.
Hello, thank you for your input! I don’t really have any inclination towards samba, all I need to get done is have a local directory accessible from outside the network and still be accessible inside the network with both read and write. I’m also going to use folders inside the directory as my jellyfin library. Do you think SFTP could potentially fulfill this use case? I’ll look more into this.
The way you are wanting to access the samba share from outside is not the smartest idea and could leave you open to vulnerabilities. The best and the proper way would be to setup a VPN to access the share remotely. tailscale would be the easiest to set up. Headscale which I used is the open source version of tailscale and works very well.
I will preface by saying that using SAMBA over the Internet is just a bad idea. There are far better ways to access your data from outside the LAN, like SFTP.
But, SAMBA uses port 445, so you need to configure things to use port 445, such as opening the port on your router and forwarding to the SAMBA server. I do not believe it is something you can do with an nginx proxy since SAMBA is not http(s), obviously, and nginix just serves http(s). You can stream ssh with ngnix, but I don't think it will do that with SAMBA.
Your best way is to use a VPN or, at a minimum, configure the SAMBA server to use
smb min protocol = SMB3_02
andsmb encrypt = required
. But, again, I would never say using SAMBA via the Internet is a good idea or good practice.Hello, thank you for your input! I don’t really have any inclination towards samba, all I need to get done is have a local directory accessible from outside the network and still be accessible inside the network with both read and write. I’m also going to use folders inside the directory as my jellyfin library. Do you think SFTP could potentially fulfill this use case? I’ll look more into this.
More replies More replies
The way you are wanting to access the samba share from outside is not the smartest idea and could leave you open to vulnerabilities. The best and the proper way would be to setup a VPN to access the share remotely. tailscale would be the easiest to set up. Headscale which I used is the open source version of tailscale and works very well.