nerdexam
CompTIA

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.

Security

Question

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?

Options

  • Adisable netbios = Yes
  • Bsmb port = 445
  • Cdisable directhosting = No
  • Dsocket options = port:445

How the community answered

(31 responses)
  • B
    94% (29)
  • C
    3% (1)
  • D
    3% (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`.

Adisable netbios = Yes

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.

Bsmb port = 445Correct

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.

Cdisable directhosting = No

`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.

Dsocket options = port:445

`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

#Samba#smb.conf#SMB port#NetBIOS ports#network security

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice