Reverse proxy and HTTPS
VulWall serves plain HTTP on port 8080, and Docker Compose publishes it on 127.0.0.1 only. To
use it from other machines, put a reverse proxy in front of it that terminates TLS.
- Run the proxy and point it at VulWall:
- proxy on the host:
http://127.0.0.1:8080(or yourVULWALL_PORT); - proxy in a Docker container: add the container to the
vulwall_defaultnetwork and point it athttp://web:8080.
- proxy on the host:
- Set
SECURE_COOKIES=truein.env. This turns on Secure cookies, HSTS and the redirect from HTTP to HTTPS. - Set
TRUSTED_PROXIESin.envto the proxy’s address as VulWall sees it (see below). - Apply the settings:
docker compose up -d.
TRUSTED_PROXIES
Section titled “TRUSTED_PROXIES”VulWall reads the client’s IP address and the original scheme from the X-Forwarded-For and
X-Forwarded-Proto headers, but only for requests that come from an address in
TRUSTED_PROXIES. The value is a comma-separated list of IP addresses or CIDR ranges.
-
Proxy on the host: connections reach the web container from the gateway of the
vulwall_defaultnetwork. Find it with:docker network inspect vulwall_default --format '{{(index .IPAM.Config 0).Gateway}}' -
Proxy in a container: use that container’s address on
vulwall_default:docker inspect <proxy-container> --format '{{(index .NetworkSettings.Networks "vulwall_default").IPAddress}}'
This setting matters for rate limiting. Login attempts are rate-limited per client IP (5 failed
attempts per 15 minutes). If TRUSTED_PROXIES does not match your proxy, VulWall sees every
request as coming from the proxy, so all users share one limit and a few wrong passwords lock
everyone out. Login also has a limit for the admin account of 20 attempts per 15 minutes from all
addresses together.
Caddy gets a certificate from Let’s Encrypt and sets the forwarded headers by default.
/etc/caddy/Caddyfile:
vulwall.example.com { reverse_proxy 127.0.0.1:8080}server { listen 80; server_name vulwall.example.com; return 301 https://$host$request_uri;}
server { listen 443 ssl; http2 on; server_name vulwall.example.com;
ssl_certificate /etc/letsencrypt/live/vulwall.example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/vulwall.example.com/privkey.pem;
location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; }}Example .env
Section titled “Example .env”SECURE_COOKIES=trueTRUSTED_PROXIES=172.18.0.1Replace 172.18.0.1 with the address you found above.