What parameter is required in smb.conf to restrict access to the SMB (445/tcp) port and stop the use of NetBIOS (139/tcp) in Samba 3?

Master the LPIC-3 300 Mixed Environment Exam with our tailored test. Utilize flashcards and multiple-choice questions, with each question offering in-depth hints and explanations. Prepare effectively and conquer your exam!

The parameter that is necessary in the smb.conf file to restrict access to the SMB port and disable the use of NetBIOS is "smb ports = 445." By setting this option, you are explicitly instructing Samba to only listen on the specified port, which is 445 for the SMB protocol. This effectively disables any listening on the NetBIOS port (139), thereby preventing clients from connecting using NetBIOS over TCP/IP.

Using "smb ports = 445" is a straightforward method to ensure that only the more modern and secure SMB protocol is used while mitigating potential vulnerabilities associated with the older NetBIOS protocol. This change is particularly relevant for environments that prioritize security, as it reduces the attack surface by eliminating unnecessary service exposure.

The other options do not directly achieve this goal. For instance, while "disable netbios = Yes" is related to disabling NetBIOS, it does not specifically control the ports that Samba listens on. Similarly, "disable directhosting = No" and "socket options = port: 445" are not valid Samba parameters for managing access to ports or configuring NetBIOS behavior. Thus, "smb ports = 445" is the correct choice in this context.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy