nerdexam
CompTIA

XK0-006 · Question #92

A systems administrator is deploying a new secure web server but is having issues starting it. The administrator reviews the following outputs: Which of the following commands fixes this issue while…

The correct answer is C. semarage -a -t http_port_t -p tcp 1234. The web server is running with SELinux in enforcing mode, and Apache is denied permission to bind to TCP port 1234 because that port is not labeled for HTTP services. Adding port 1234 to the http_port_t SELinux type allows Apache to bind to the port while keeping SELinux…

Security

Question

A systems administrator is deploying a new secure web server but is having issues starting it. The administrator reviews the following outputs:

Which of the following commands fixes this issue while following security best practices?

Exhibit

XK0-006 question #92 exhibit

Options

  • Asetsebool -P http_port_t 1234
  • Bsetenforce 0
  • Csemarage -a -t http_port_t -p tcp 1234
  • Dsystemctl unmask httpd

How the community answered

(29 responses)
  • A
    14% (4)
  • B
    3% (1)
  • C
    76% (22)
  • D
    7% (2)

Explanation

The web server is running with SELinux in enforcing mode, and Apache is denied permission to bind to TCP port 1234 because that port is not labeled for HTTP services. Adding port 1234 to the http_port_t SELinux type allows Apache to bind to the port while keeping SELinux enforcing, which follows security best practices.

Topics

#SELinux#semanage#port context#web server

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice