nerdexam
CompTIA

XK0-004 · Question #456

An administrator is investigating issues with an unresponsive website hosted on an internal web server named websrv. After gathering diagnostics data the administrator performs the following…

The correct answer is C. Iptables -I INPUT 1 -p tcp -dport 80 -j ACCETP. The web server is unresponsive because an iptables firewall rule is blocking incoming HTTP traffic on port 80.

Troubleshooting and Diagnostics

Question

An administrator is investigating issues with an unresponsive website hosted on an internal web server named websrv. After gathering diagnostics data the administrator performs the following analysis:

Which of the following would MOST likely resolve the issue on the web server?

Exhibit

XK0-004 question #456 exhibit

Options

  • ASystemct1 restart httpd
  • BIfup etho
  • CIptables -I INPUT 1 -p tcp -dport 80 -j ACCETP
  • DRoute add default gw 10.0.112.0eth0

How the community answered

(31 responses)
  • A
    6% (2)
  • B
    26% (8)
  • C
    52% (16)
  • D
    16% (5)

Why each option

The web server is unresponsive because an iptables firewall rule is blocking incoming HTTP traffic on port 80.

ASystemct1 restart httpd

Restarting httpd would only help if the web daemon itself had crashed, not if a firewall rule was silently dropping all inbound connections on port 80.

BIfup etho

Running 'ifup eth0' only helps if the network interface is completely down, which would break all connectivity - not selectively block web traffic.

CIptables -I INPUT 1 -p tcp -dport 80 -j ACCETPCorrect

Inserting an iptables rule with '-I INPUT 1 -p tcp --dport 80 -j ACCEPT' places an ACCEPT rule at the top of the INPUT chain, allowing TCP traffic destined for port 80 to reach the web server. When a firewall implicitly drops inbound connections, no service restart or routing change will restore web access. This rule directly addresses the most common cause of a reachable but unresponsive internal web server.

DRoute add default gw 10.0.112.0eth0

Adding a default gateway route affects outbound packet routing, not inbound HTTP requests; the firewall would still drop the client's request before the web service could respond.

Concept tested: Linux iptables firewall rule insertion for HTTP access

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

Topics

#iptables#firewall rules#web server troubleshooting#HTTP access

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice