How to access samba server from Internet ?

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 network provider : ( is my NAS ip on my local network)


whats upwhats up, 2010/01/08 01:00

does this really work, i tried it, but it didn´t. i can´t connect.

paulpaul, 2010/04/06 12:22

Worked for me.

JuanJuan, 2010/04/25 11:43

Work like a charm! Thanks!!

atiati, 2010/05/23 23:06

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!

BobBob, 2011/01/28 05:25

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.

Enter your comment

Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki