LX0-104 · 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 to only use port 445 for SMB traffic and cease listening on port 139 for NetBIOS, the smb port = 445 parameter is required in smb.conf.
Question
Options
- Adisable netbios = Yes
- Bsmb port = 445
- Cdisable directhosting = No
- Dsocket options = port:445
How the community answered
(31 responses)- B94% (29)
- C3% (1)
- D3% (1)
Why each option
To restrict Samba to only use port 445 for SMB traffic and cease listening on port 139 for NetBIOS, the `smb port = 445` parameter is required in `smb.conf`.
While `disable netbios = yes` would prevent Samba from using port 139, it also disables all NetBIOS name resolution services, which is a broader impact than simply controlling the listening ports.
The `smb port` parameter explicitly configures Samba to listen only on the specified port(s). Setting `smb port = 445` causes Samba to only accept connections on TCP port 445, effectively stopping the use of TCP port 139 for NetBIOS sessions.
`disable directhosting = No` would enable SMB over TCP/IP (port 445) but does not inherently stop the use of port 139 unless other port configurations are also made.
`socket options` is used for configuring various TCP socket-level behaviors and does not specify which ports Samba should listen on; the syntax `port:445` is incorrect for this parameter.
Concept tested: Samba listening port configuration
Source: https://www.samba.org/samba/docs/current/manpages/smb.conf.5.html
Topics
Community Discussion
No community discussion yet for this question.