LFCS · Question #332
In order to restrict access to the SMB (445/tcp) port and stop the use of NetBIOS (139/tcp), what parameter is required in smb.conf in Samba 3?
The correct answer is B. smb port = 445. To restrict Samba's listening ports to only SMB (445/tcp) and prevent NetBIOS over TCP/IP (139/tcp), the smb port parameter in smb.conf should be used.
Question
Options
- Adisable netbios = Yes
- Bsmb port = 445
- Cdisable directhosting = No
- Dsocket options = port:445
How the community answered
(24 responses)- B92% (22)
- C4% (1)
- D4% (1)
Why each option
To restrict Samba's listening ports to only SMB (445/tcp) and prevent NetBIOS over TCP/IP (139/tcp), the `smb port` parameter in `smb.conf` should be used.
The `disable netbios` parameter is not a standard or recognized configuration directive in Samba for controlling port usage.
Setting `smb port = 445` in `smb.conf` configures Samba to listen exclusively on port 445 for SMB traffic. This effectively disables the legacy NetBIOS session service on port 139, restricting access to modern direct SMB over TCP.
`disable directhosting` is not a valid Samba parameter for port control; 'direct hosting' refers to SMB over TCP, and this parameter would incorrectly suggest disabling it.
The `socket options` parameter is used for setting low-level TCP socket options, not for specifying the listening port, and `port:445` is not a valid syntax for this parameter.
Concept tested: Samba port configuration and NetBIOS disablement
Source: https://www.samba.org/samba/docs/current/manpages/smb.conf.5.html
Topics
Community Discussion
No community discussion yet for this question.