Signal9Signal9 — home
online
back to labs

PostgreSQL: Open Remote Access with pg_hba

MediumNetworking15-25 min
The brief

PostgreSQL listens on localhost only. Open it to the app subnet. Your assignment is in /root/case/assignment.env (LISTEN_ADDRESS, CLIENT_CIDR, AUTH_METHOD).

Two edits under /etc/postgresql/15/main/:

1. postgresql.conf: listen_addresses = 'LISTEN_ADDRESS'.

2. pg_hba.conf: a host rule — host all all CLIENT_CIDR AUTH_METHOD.

Grading reads both config files (postgres need not be running). See /root/case/brief.txt.

What you'll do
  • Set listen_addresses so postgres accepts LAN connections
  • Add a pg_hba host rule for the client subnet
  • Require the assigned auth method for that rule
  • Understand the listen_addresses + pg_hba pairing

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.