Bonjour, je vous explique ma problématique je n’arrive pas à avoir les publiques qui se connectent sur jellyfin je n’est que l’ip du reverse proxy principal 192.168.1.2 hors je voudrais avoir les ip publiques qui remonte derrière le reverser proxy sur jellyfin dans ces log
Actuellement, j’ai une vm nginx qui sert de reverse proxy uniquement.
Puis j’ai une deuxième VM avec jellyfin dessus pour des réseaux de sécurité même si c’est dans mon lan la communication entre le reverse proxy et jellyfin sois chifffrée (en auto signée)
Donc sur la vm jellyfin il y a aussi un nginx qui fais reverse proxy vers jellyfin en 127.0.0.1
Petit schéma explicatif
VM reverse 192.168.1.2 => VM nginx + jellyfin
Chemin réseau vm reverse 192.168.1.2 => vm avex nginx qui redirige vers jellyfin en 127.0.0.1 la deuxième vm a jellyfin + nginx
Je ne suis même pas sûr que ce que je demande sois vraiment possible
j’ai essayé diverse config est le changement de paramétrages, mais rien n’y fais.
Si vous avez une idée, n’hésitez pas
voici le vhost du reverse proxy principal qui reçois les connexions externe
server {
#HTTP2
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
#http3 / quic (future version)
listen 443 quic;
listen [::]:443 quic;
server_name exemple.exemple.com;
ssl_certificate /etc/letsencrypt/live/exemple.exemple.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/exemple.exemple.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/exemple.exemple.com/chain.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 1440m;
ssl_buffer_size 8k;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA>
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
add_header Access-Control-Allow-Origin "https://exemple.exemple.com" always;
add_header Feature-Policy "microphone 'none'; payment 'none'; sync-xhr 'self' https://exemple.exemple.com" always;
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Set-Cookie "HttpOnly;Secure" always;
add_header Feature-Policy "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'self'; battery 'none'; camera 'none'" always;
#add_header Content-Security-Policy "script-src 'self' https://exemple.exemple.com" always;
add_header Permissions-Policy "accelerometer=('none'), geolocation=('none'), fullscreen=(), ambient-light-sensor=(), autoplay=(), battery=('none')" always;
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Forwarded-Host $remote_addr; #header HTTP3 (future version)
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
location / {
proxy_pass https://192.168.1.3:443/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-Proto https;
#proxy_set_header X-Forwarded-Host $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#Désactiver la vérification du certificat
proxy_ssl_verify off;
}
error_log /var/log/nginx/jellyfin-error.log;
access_log /var/log/nginx/jellyfin-access.log;
}
server {
listen 80;
server_name exemple.exemple.com;
return 301 https://exemple.exemple.com$request_uri;
rewrite ^ https://$http_host$request_uri? permanent;
}
et le vhost nginx de la deuxième vm contenant nginx et jellyfin
server {
#HTTP2
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
#http3 / quic (future version)
listen 443 quic;
listen [::]:443 quic;
server_name exemple.exemple.com;
ssl_certificate /etc/ssl/nginx/certificate.crt;
ssl_certificate_key /etc/ssl/nginx/private.key;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 1440m;
ssl_buffer_size 8k;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GC>
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
add_header Access-Control-Allow-Origin "https://exemple.exemple.com" always;
add_header Feature-Policy "microphone 'none'; payment 'none'; sync-xhr 'self' https://exemple.exemple.com" always;
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Set-Cookie "HttpOnly;Secure" always;
add_header Feature-Policy "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'self'; battery 'none'; camera 'none'" always;
#add_header Content-Security-Policy "script-src 'self' https://exemple.exemple.com" always;
add_header Permissions-Policy "accelerometer=('none'), geolocation=('none'), fullscreen=(), ambient-light-sensor=(), autoplay=(), battery=('none')" always;
proxy_set_header X-Forwarded-Proto "https";
#header HTTP3 (future version)
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
location / {
proxy_pass http://127.0.0.1:8096/;
#proxy_set_header Host $host;
#proxy_set_header Host $proxy_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#add_header Alt-Svc 'h3=":$server_port"; ma=86400';
}
error_log /var/log/nginx/jellyfin-error.log;
access_log /var/log/nginx/jellyfin-access.log;
}