nerdexam
CompTIA

XK0-006 · Question #156

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?

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.

Security

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

How the community answered

(20 responses)
  • A
    25% (5)
  • B
    5% (1)
  • C
    60% (12)
  • D
    10% (2)

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.

Topics

#iptables#CUPS#firewall rules#INPUT chain

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice