nerdexam
CompTIA

XK0-006 · Question #156

XK0-006 Question #156: Real Exam Question with Answer & Explanation

The correct answer is C. iptables -A INPUT -s 192.168.100.0/24 --dport 631 -p tcp -j ACCEPT. Allowing access to the CUPS service requires permitting incoming TCP connections to port 631 from the local network. Adding an INPUT rule with the source network and destination port 631 ensures only hosts on that subnet can connect to the print service.

Question

A Linux administrator is configuring a CUPS print service on a Linux machine and needs to allow only connections from a local network. Which of the following commands should the administrator use?

Options

  • Aiptables -A OUTPUT -d 192.168.100.0/24 --sport 631 -p tcp -j ACCEPT
  • Biptables -A OUTPUT -s 192.168.100.0/24 --dport 631 -p tcp -j ACCEPT
  • Ciptables -A INPUT -s 192.168.100.0/24 --dport 631 -p tcp -j ACCEPT
  • Diptables -D INPUT -d 192.168.100.0/24 --dport 631 -p tcp -j ACCEPT

Explanation

Allowing access to the CUPS service requires permitting incoming TCP connections to port 631 from the local network. Adding an INPUT rule with the source network and destination port 631 ensures only hosts on that subnet can connect to the print service.

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice