Situation
The server runs a site: nginx on port 80. It must open from the office, from the address
192.0.2.20, and stay closed to every other address on the network. The office complains: the
site does not open, the request hangs. On the server itself curl http://127.0.0.1/ answers.
The office is the lab-client network namespace, and its interface has two addresses:
192.0.2.20 (the office) and 192.0.2.30 (another address on the same network). The server's
address on this network is 192.0.2.10. A request from the right address:
sudo ip netns exec lab-client curl -sS --connect-timeout 3 \
--interface 192.0.2.20 http://192.0.2.10/
The server's firewall is loaded by the nftables service from /etc/nftables.conf.
Task
- From
192.0.2.20, the sitehttp://192.0.2.10/answers HTTP 200. - From
192.0.2.30, the site does not open. - The rules in the kernel are the ones in
/etc/nftables.conf, and thenftablesservice is enabled, so everything stays the same after a reboot. - The
droppolicy of theinputchain and the SSH permission on port22are in place.
The tools you need are already installed. There's no internet on this machine.
Lab goals
0 of 4-
From the office address 192.0.2.20 the site http://192.0.2.10/ answers HTTP 200 — not checked yet
-
From the address 192.0.2.30 the site does not open — not checked yet
-
The rules are loaded from /etc/nftables.conf, and the nftables service is enabled — not checked yet
-
The drop policy and the SSH permission are in place — not checked yet
Hints
0 of 3 open · they open one at a time
Hint 1
Show the solution
after 3 failed checks