kevtechxx
Goto Top

Peertube zeigt falsche public IP im debug panel an

Hallo,
Peertube zeigt die interne IP Adresse von meinem router (192.168.5.1) als public IP an.
Leider funktioniert P2P deshalb nicht.

Was ich schon versucht habe:
- Die IP Adresse von meinem router als trusted proxy in die config.yml einzutragen
- Nginx als transparenten proxy zu configurieren (ich bin mir unsicher ob Nginx das nicht schon standartmäßig macht)

Hier meine config-dateien falls es weiterhilft:

der erste teil meiner config.yml:
listen:
  hostname: 0.0.0.0
  port: 9000

# Correspond to your reverse proxy server_name/listen configuration
webserver:
  https: true
  hostname: 'kevtechxx.de'  
  port: 443

rates_limit:
  api:
    # 50 attempts in 10 seconds
    window: 10 seconds
    max: 50
  login:
    # 15 attempts in 5 min
    window: 5 minutes
    max: 15
  signup:
    # 2 attempts in 5 min (only succeeded attempts are taken into account)
    window: 5 minutes
    max: 2
  ask_send_email:
    # 3 attempts in 5 min
    window: 5 minutes
    max: 3

# Proxies to trust to get real client IP
# If you run PeerTube just behind a local proxy (nginx), keep 'loopback' 
# If you run PeerTube behind a remote proxy, add the proxy IP address (or subnet)
trust_proxy:
  - 'loopback'  
  - 192.168.5.181
  - 192.168.5.1

und meine nginx konfiguration (externer reverse proxy):
server { listen 80; listen [::]:80; server_name kevtechxx.de; access_log /var/log/nginx/kevtechxx.de.access.log; error_log 
  /var/log/nginx/kevtechxx.de.error.log;
  #location /.well-known/acme-challenge/ { default_type "text/plain"; root /var/www/certbot;  
  #}
  location / { return 301 https://$host$request_uri; }
}
server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name kevtechxx.de;
  # For example with certbot (you need a certificate to run https)
  ssl_certificate /etc/letsencrypt/live/kevtechxx.de/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/kevtechxx.de/privkey.pem;
  # Security hardening (as of 11/02/2018)
  ssl_protocols TLSv1.3; # TLSv1.3, TLSv1.2 if nginx >= 1.13.0 ssl_prefer_server_ciphers on;
  # Remove ECDHE-RSA-AES256-SHA if you don't want compatibility with Android 4  
  ssl_ciphers 
  'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA';  
  # ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0, not compatible with import-videos script dhparam / diffie helman
  ssl_dhparam /etc/ssl/certs/dhparam.pem; ssl_session_timeout 10m; ssl_session_cache shared:SSL:10m; ssl_session_tickets off; # Requires nginx >= 1.5.9 
  ssl_stapling on; # Requires nginx >= 1.3.7 ssl_stapling_verify on; # Requires nginx => 1.3.7
  # HSTS (https://hstspreload.org), requires to be copied in 'location' sections that have add_header directives add_header Strict-Transport-Security  
  #"max-age=63072000; includeSubDomains";  
  # Configure with your resolvers resolver $DNS-IP-1 $DNS-IP-2 valid=300s; resolver_timeout 5s;
  resolver 1.1.1.1 1.0.0.1 valid=300s; resolver_timeout 5s;
  # Enable compression for JS/CSS/HTML bundle, for improved client load times. It might be nice to compress JSON, but leaving that out to protect against 
  # potential compression+encryption information leak attacks like BREACH.
  gzip on; gzip_types text/css application/javascript; gzip_vary on;
  # If you have a small /var/lib partition, it could be interesting to store temp nginx uploads in a different place See 
  # https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_temp_path client_body_temp_path /var/www/peertube/storage/nginx/;
  access_log /var/log/nginx/kevtechxx.de.access.log; error_log /var/log/nginx/kevtechxx.de.error.log;
  #location ^~ '/.well-known/acme-challenge' { default_type "text/plain"; root /var/www/certbot;  
  #}
  location / { 
#	proxy_pass http://192.168.5.176:9000; 
	proxy_set_header X-Real-IP $remote_addr; 
	proxy_set_header Host $host; 
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    
    
    # This is the maximum upload size, which roughly matches the maximum size of a video file you can send via the API or the web interface. By default 
    # this is 8GB, but administrators can increase or decrease the limit. Currently there's no way to communicate this limit to users automatically, so you   
    # may want to leave a note in your instance 'about' page if you change this.  
    #
    # Note that temporary space is needed equal to the total size of all concurrent uploads. This data gets stored in /var/lib/nginx by default, so you may 
    # want to put this directory on a dedicated filesystem.
    #
    client_max_body_size 8G; proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600;
    proxy_pass http://192.168.5.176:9000;
  }
}

LG kevtechxx

Content-Key: 595935

Url: https://administrator.de/contentid/595935

Ausgedruckt am: 19.03.2024 um 10:03 Uhr

Mitglied: tomolpi
tomolpi 13.08.2020 aktualisiert um 16:59:26 Uhr
Goto Top
-auch keine Begrüßung
Zitat von @kevtechxx:

Peertube zeigt die falsche public IP im debug panel an und p2p funktioniert deshalb nicht richtig
Schön.

-auch keine Verabschiedung

PS: Wie Du eine Frage richtig stellst

Bitte überarbeiten, sonst wandert der Thread hier in den Müll.

tomolpi
Moderator
Mitglied: kevtechxx
kevtechxx 13.08.2020 aktualisiert um 17:12:07 Uhr
Goto Top
ok danke, ich bin neu auf dem forum sorry.
den titel konnte ich leider nicht bearbeiten da das forum-system es mir nicht erlaubt
Mitglied: tomolpi
tomolpi 13.08.2020 um 18:36:34 Uhr
Goto Top
Zitat von @kevtechxx:

ok danke, ich bin neu auf dem forum sorry.
den titel konnte ich leider nicht bearbeiten da das forum-system es mir nicht erlaubt
Bitte teile mir den neuen Titel bzw. alle Änderungen mit. Ich kann das dann ändern.

Grüße

tomolpi
Moderator