Hi
I run my omv gui behind an nginx proxy.
This is done with these settings (nginxproxy as docker container on omv directly) :
Code
server {
listen 80;
server_name xxxxxxxxxxxxx;
# Redirect HTTP to HTTPS
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name xxxxxxxxxxxxx;
# SSL certificate files
ssl_certificate /etc/nginx/certs/xxxxxxxxxxxxx.crt;
ssl_certificate_key /etc/nginx/certs/xxxxxxxxxxxxx.key;
# Proxy settings
location / {
proxy_pass http://192.168.1.11:8080;
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;
}
}
Alles anzeigen
Which should be pretty standard settings.
But my issue is that in /var/log/auth.log it logs the IP of the nginx container instead of the actual source IP for fail2ban.
(yes I am exposing publicly with basic auth ontop)
How do I make omv log the real IP and not the proxy IP so basically make it respect the headers?
Didn't find a thread detailing that unfortunately
Thanks a lot!