iptables Stateful Firewall Rules

Restrict a service port to internal traffic only without locking yourself out of SSH.

A advanced Linux challenge worth 20 points. Solve it hands-on in a real Linux environment in your browser - no local setup, no fake shells.

The Challenge

A microservice must accept port 8080 only from 10.0.0.0/8. All other traffic to 8080 must be dropped. One attacker IP must be blocked entirely.

Your tasks:

Block attacker IP 203.0.113.42 entirely (INPUT chain, -j DROP) ACCEPT ESTABLISHED,RELATED (protects SSH) ACCEPT port 8080 from 10.0.0.0/8 DROP port 8080 from all other sources