nerdexam
CompTIA

XK0-004 · Question #88

A Linux administrator implemented a new HTTP server using the default configuration. None of the users on the network can access the server. If there is no problem on the network or with the users'…

The correct answer is A. Run netstat to ensure the port is correctly bound, and configure the firewall to allow access on ports. After a default HTTP server installation where no users can connect, the most effective combined approach is using netstat to confirm the daemon is listening on the correct port and then configuring the host firewall to permit inbound traffic on that port.

Troubleshooting and Diagnostics

Question

A Linux administrator implemented a new HTTP server using the default configuration. None of the users on the network can access the server. If there is no problem on the network or with the users' workstations, which of the following steps will BEST analyze and resolve the issue?

Options

  • ARun netstat to ensure the port is correctly bound, and configure the firewall to allow access on ports
  • BRun route to ensure the port is correctly bound, and configure the firewall to allow access on ports
  • CRun netcat to ensure the port is correctly bound, and configure a static route to the web to allow
  • DRun route to ensure the port is correctly bound, and configure SELinux to allow access on ports 80

How the community answered

(20 responses)
  • A
    70% (14)
  • B
    20% (4)
  • C
    5% (1)
  • D
    5% (1)

Why each option

After a default HTTP server installation where no users can connect, the most effective combined approach is using netstat to confirm the daemon is listening on the correct port and then configuring the host firewall to permit inbound traffic on that port.

ARun netstat to ensure the port is correctly bound, and configure the firewall to allow access on portsCorrect

Running 'netstat -tlnp' (or the modern equivalent 'ss -tlnp') shows all TCP ports currently bound and which process owns them, confirming whether the HTTP daemon started and is listening on port 80. After verifying the bind, adding a firewall rule to allow inbound TCP traffic on port 80 and 443 addresses the most common reason a default-configured server is unreachable from the network. Together these two steps cover both the service layer and the network access layer without requiring infrastructure changes.

BRun route to ensure the port is correctly bound, and configure the firewall to allow access on ports

The 'route' command displays the kernel IP routing table and has no ability to show whether a service port is bound or listening, making it the wrong diagnostic tool here.

CRun netcat to ensure the port is correctly bound, and configure a static route to the web to allow

netcat can probe a port from a remote host but does not confirm server-side binding, and adding a static route is irrelevant when the problem is a host firewall blocking inbound connections.

DRun route to ensure the port is correctly bound, and configure SELinux to allow access on ports 80

The 'route' command cannot verify port binding, and reconfiguring SELinux policy is not the standard first corrective step for a default HTTP installation that simply needs a firewall rule.

Concept tested: Verifying HTTP service binding and firewall rule configuration

Source: https://man7.org/linux/man-pages/man8/netstat.8.html

Topics

#netstat#firewall#HTTP server#port binding

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice