back to labs
Firewall: Open Service Ports (nftables)
MediumNetworking15-20 minThe brief
Two services on this host are being blocked at the firewall. This box uses nftables, whose persistent ruleset lives in /etc/nftables.conf. Read /root/case/assignment.env for the two TCP ports (PORT_A, PORT_B) that must be reachable, and add accept rules for them to /etc/nftables.conf so they persist across reboots.
Grading loads /etc/nftables.conf the way the nftables service does at boot (in an isolated network namespace) and reads back the ruleset it produces. The file has to load without errors, and each port needs an accept rule in a chain hooked on input. A commented-out line, or a file nft rejects, opens nothing.
What you'll do
- Add a persistent accept rule for the first TCP port
- Add a persistent accept rule for the second TCP port
- Put the rules in /etc/nftables.conf so they survive a reboot
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
