Suppose you have a "Network Attached Storage" (NAS) on your local network area that is configured with a samba server to access the data. I personnaly have a "D-Link DNS-323" which has a samba server. You would like to access the NAS's data from Internet. You'll have to configure your firewall to redirect the Samba ports.
Here is the ports needed by Samba :
port | nom du service | protocole |
---|---|---|
137 | NetBIOS Name Service (nbname) | UDP |
138 | NetBIOS Datagram Service (nbdatagram) | UDP |
139 | NetBIOS Session Service (nbsession) | TCP |
445 | "Direct-Hosted" TCP | TCP et UDP |
Just create NAT rules on your firewall and you will be able to access your samba server from Internet. Here is a NAT example on free.fr network provider :
(192.168.0.99
is my NAS ip on my local network)
Discussion
does this really work, i tried it, but it didn´t. i can´t connect.
Worked for me.
Work like a charm! Thanks!!
I tried it, but it didn't work. Could you please write the NAS and the router settings? (On the NAS: Gateway, DNS1, DNS2, On the router: Host name, Domain name) Thanks!
Wow, what a bad idea! Do you really want to open a samba share to the internet? Why don't you try a secure shell tunnel? Much more secure.