16/57
Sign inSign up free

1382. Open One Port, Close an Unused Service

medium 20 XP ~6 minHands-on lab

An application on this server listens on TCP port 8398. A colleague opened it yesterday, but after this morning's firewall reload clients can't connect again. A security review also flagged the cockpit service: it isn't installed here and shouldn't be reachable.

Task

  • Allow 8398/tcp in the default zone, now and after any reload or reboot.
  • Remove the cockpit service from the default zone, now and permanently.
  • ssh must stay allowed.

About this machine

Rocky Linux 9 (binary-compatible with RHEL 9) with no internet access. You are student with passwordless sudo. firewalld, chronyd, tuned, crond, atd and sshd really run, and dnf installs from the offline mirror at http://repo.lab:7080/. The machine never reboots: the grader checks its final state and what the next boot would do (enabled services, permanent firewall rules, the default target), not the commands you typed.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.