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)