recently we received a question regarding a customer using their Linux Dedicated server with the SAMBA suite. and wants to know what port does samba uses so he can open the port in his firewall

here is the answer:

Using a firewall

Many people use a firewall to deny access to services that they don't want exposed outside their network. This can be a very good idea, although I would recommend using it in conjunction with the above methods so that you are protected even if your firewall is not active for some reason.

If you are setting up a firewall then you need to know what TCP and UDP ports to allow and block. Samba uses the following:

UDP/137 - used by nmbd
UDP/138 - used by nmbd
TCP/139 - used by smbd
TCP/445 - used by smbd

if you need more information you may visit the official samba site:

http://www.samba.org/samba/docs/server_security.html