Set up a reverse proxy through Nginx Proxy Manager and enforce all Podman services to use HTTPS connections.
# generate ecdsa key
openssl ecparam -name prime256v1 -genkey -noout -out hynas.key
# Generate a Certificate Signing Request (CSR)
openssl req -new -key hynas.key -out hynas.csr
# Generate a Self-Signed ECDSA Certificate
openssl req -x509 -key hynas.key -in hynas.csr -out hynas.crt -days 365
# verified
openssl x509 -in hynas.crt -text -noout
# Combine the Key and Certificate (Optional)
cat hynas.key hynas.crt > hynas.pem
And upload the ssl certificates in SSL certificates->Custom.
podman inspect --format '{{json .NetworkSettings}}' <container_name> | jq
Assume the calibre IP is at 10.89.0.2:8083.
location /calibre/ {
rewrite ^/calibre(/.*)$ $1 break;
proxy_pass http://10.89.0.2:8083/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
deploy the pi-hole and set the dns name for local server. It's important to add the following settings into the docker-compose.yaml.
environment:
- DNSMASQ_LISTENING=all
After all setup pi-hole DNS server IP address into router and test the dns request:
dig @192.168.1.200 hynas.local
curl -L --insecure -v --resolve hynas.home:53:192.168.1.200 https://hynas.home/calibre