Many people use a firewall to deny access to services they do not want exposed outside their network. This can
be a good idea, although I recommend using it in conjunction with the above methods so you are protected even
if your firewall is not active for some reason.
If you are setting up a firewall, you need to know what TCP and UDP ports to allow and block. Samba uses
the following:
Port 135/TCP - used by smbd |
Port 137/UDP - used by nmbd |
Port 138/UDP - used by nmbd |
Port 139/TCP - used by smbd |
Port 445/TCP - used by smbd |
The last one is important because many older firewall setups may not be aware of it, given that this port
was only added to the protocol in recent years.
When configuring a firewall, the high order ports (1024-65535) are often used for outgoing connections and
therefore should be permitted through the firewall. It is prudent to block incoming packets on the high order
ports except for established connections.
|