nerdexam
CompTIA

XK0-005 · Question #105

A new HTTPS web service is being deployed on a server. Which of the following commands should the Linux administrator use to ensure traffic is able to flow through the system firewall to the new…

The correct answer is B. iptables -A INPUT -p tcp --dport 443 -j ACCEPT. HTTPS operates on TCP port 443. To allow incoming client requests to reach the web service, a rule must be added to the INPUT chain accepting TCP traffic destined for port 443 (--dport 443). Option B ('iptables -A INPUT -p tcp --dport 443 -j ACCEPT') correctly does this. Option…

Security

Question

A new HTTPS web service is being deployed on a server. Which of the following commands should the Linux administrator use to ensure traffic is able to flow through the system firewall to the new service?

Options

  • Aiptables -I OUTPUT -p tcp --sport 443 -j ACCEPT
  • Biptables -A INPUT -p tcp --dport 443 -j ACCEPT
  • Ciptables -I INPUT --dport 443 -j ACCEPT
  • Diptables -A OUTPUT -p tcp --dport 443 -j ACCEPT

How the community answered

(45 responses)
  • A
    4% (2)
  • B
    84% (38)
  • C
    2% (1)
  • D
    9% (4)

Explanation

HTTPS operates on TCP port 443. To allow incoming client requests to reach the web service, a rule must be added to the INPUT chain accepting TCP traffic destined for port 443 (--dport 443). Option B ('iptables -A INPUT -p tcp --dport 443 -j ACCEPT') correctly does this. Option A targets the OUTPUT chain with --sport 443, which would affect outgoing responses, not incoming requests. Option C is missing the required '-p tcp' protocol specifier, making it an invalid iptables rule. Option D targets the OUTPUT chain with --dport 443, which would affect outgoing connections to port 443 on other systems, not inbound service traffic.

Topics

#iptables#Firewall Rules#HTTPS#Network Security

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice