Labs / Firewall Rule Review
CloudEasy

Firewall Rule Review

ChaiCorp asked you to review the inbound rules on its cloud security groups. Read the rules and the review notes, then decide what to do with each finding.

Remember: 0.0.0.0/0 means every IPv4 address, and ::/0 means every IPv6 address.

Answer every question correctly to get the flag.

security-groups.txt

ChaiCorp security groups (inbound rules only)

sg-0a1  lb-public       Load balancer, public subnet
  TCP  443   0.0.0.0/0          "HTTPS for customers"
  TCP  80    0.0.0.0/0          "Redirects visitors to HTTPS"

sg-0b2  app-servers     App servers, private subnet
  TCP  8080  sg-0a1             "Traffic from the load balancer only"

sg-0c3  orders-db       PostgreSQL database, PUBLIC subnet, public IP 203.0.113.40
  TCP  5432  sg-0b2             "App servers"
  TCP  5432  0.0.0.0/0          "temp test - Usman"

sg-0d4  admin-windows   Windows admin server, public subnet
  TCP  3389  198.51.100.10/32   "Office only"
  TCP  3389  ::/0               "Added by setup script"

sg-0e5  jump-linux      Linux server, public subnet
  TCP  22    0.0.0.0/0          "Vendor support, March, temporary"
1. The orders-db group has two rules for port 5432. What change should you make first?
2. The lb-public group allows ports 443 and 80 from 0.0.0.0/0. What should you do with these rules?
3. A colleague says: "admin-windows is safe, because RDP is allowed only from the office IP." Is that correct?
4. The jump-linux group still allows SSH from 0.0.0.0/0 for a vendor. What is the best action?
5. The orders-db server sits in a public subnet with a public IP address. What is the better long-term design?
6. How can ChaiCorp catch rules like these sooner in the future?

Submit the flag