Skip to content

Chapter 11: Verification

# Check Command / where Expected
1 Only web + SSH listen publicly sudo ss -tlnp :80, :443, :22 (if used), 127.0.0.1:8000. No 5432/6379/8000 on 0.0.0.0/[::]
2 Ports closed from outside (use a non-office network) nc -zv -w5 <ip> 5432 / 6379 / 8000 / 22 timeout (22 open only from office)
3 RDS not public dig +short <rds-endpoint>; nc -zv -w5 <rds-endpoint> 5432 from laptop private IP; timeout
4 DB containers publish nothing docker port <db>; docker port <redis> empty
5 App DB role not superuser select rolsuper from pg_roles where rolname=current_user f
6 Shell-from-SQL blocked (self-hosted) copy (select 1) to program 'id' as app role permission denied
7 App reaches DB python manage.py shell -c "from django.db import connection; connection.ensure_connection(); print('DB OK')" DB OK
8 Redis requires password docker compose exec redis redis-cli ping NOAUTH
9 Debug off request a non-existent URL short 404, no debug page
10 HTTPS works, HTTP redirects curl -sI https://<domain>, curl -sI http://<domain> 200/30x; 301 to https
11 Django deploy checks python manage.py check --deploy no warnings you haven't consciously accepted
12 Security groups console named, described, no 0.0.0.0/0 except 80/443; nothing in default