44/53
Sign inSign up free

831. The Database Is on the Internet

easy 10 XP ~7 minHands-on lab

Labs have no container engine, so nothing is started: your files are checked with docker-compose config.

A scan of the reviews host found PostgreSQL, Redis and Adminer answering from the internet. Docker publishes ports on all interfaces by default, and it bypasses most host firewalls (UFW) to do so.

Task

Change the ports in /home/student/projects/reviews/compose.yaml:

ServiceShould be reachable
webfrom anywhere, on ports 80 and 443 (as now)
dbonly from the host itself, at 127.0.0.1:5432
admineronly from the host itself, at 127.0.0.1:8081
cachenot from the host at all: only the other containers use it

The containers keep reaching each other through the Compose network. Keep the images.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

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.