Q. What ports need to be open for Samba to communicate with other windows/linux systems? I need to configure Linux firewall so I need the exact port names.
A. You can get list of ports from file called /etc/services. For your ease of use here are ports you need to open for two-way samba communication with Windows and Linux desktop systems.
- netbios-ns - 137/tcp # NETBIOS Name Service
- netbios-dgm - 138/tcp # NETBIOS Datagram Service
- netbios-ssn - 139/tcp # NETBIOS session service
- microsoft-ds - 445/tcp # if you are using Active Directory
Other ports
- Port 389 (TCP) - for LDAP (Active Directory Mode)
- Port 445 (TCP) - NetBIOS was moved to 445 after 2000 and beyond, (CIFS)
- Port 901 (TCP) - for SWAT service (not related to client communication)
See this url for Iptables rules for SAMBA/CIFS clients.
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- My 10 UNIX Command Line Mistakes
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!
- Email FAQ to a friend
- Download PDF version
- Printable version
- Comment RSS feed
- Last Updated: 07/29/06


{ 1 comment… read it below or add one }
Thx. very much, nice overview :)