Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP reported as null when proxied through Apache #609

Open
bobbyl140 opened this issue Apr 6, 2024 · 14 comments
Open

IP reported as null when proxied through Apache #609

bobbyl140 opened this issue Apr 6, 2024 · 14 comments
Labels

Comments

@bobbyl140
Copy link

bobbyl140 commented Apr 6, 2024

Description

I use the Docker container of librespeed from linuxserver.io behind an Apache reverse proxy. When taking a speed test, my client IP always shows as null. I have set the X-Forwarded-For header, which works in other applications. I originally asked the linuxserver team about this, and they suggested Apache might be unsupported which isn’t something they control, and that there’s more to the IP check then that one header.

Server

Apache: 2.4.57
Podman: 4.6.1
Container: registry.gitlab.com/linuxserver.io/docker-librespeed/librespeed:latest

Client

Safari and Firefox on macOS 14.4, Microsoft Edge and Firefox on Windows 11 21H2, Safari on iOS 17.4.1

Steps to reproduce

  • Spin up a new container
  • Take a Speedtest and notice the missing IP

Expected behaviour

The IP should show.

Screenshots

IMG_9517
(Will upload a screenshot of network debugging when I’m at my computer later today)

@bobbyl140
Copy link
Author

Sorry, sent early. About to finish filling out

@sstidl
Copy link
Collaborator

sstidl commented Apr 8, 2024

The image mentioned by you is not made by us so i don't know the difference.
Regarding the unknown ISP issue, you find other issues with the solution here.

@sstidl
Copy link
Collaborator

sstidl commented Apr 8, 2024

Duplicate of #603

@sstidl sstidl marked this as a duplicate of #603 Apr 8, 2024
@bobbyl140
Copy link
Author

It’s more than just an unknown ISP, the IP address is showing as null too. They said they couldn’t help me because they didn’t make the software, so I’m not quite sure what else to do.

@sstidl
Copy link
Collaborator

sstidl commented Apr 13, 2024

Have you tried to use our image?

@bobbyl140
Copy link
Author

I had not actually, I just tried it and the same thing occurs. Here's my docker-compose.yml:

version: '3.7'
services:
  speedtest:
    container_name: speedtest
    image: ghcr.io/librespeed/speedtest:dev
    restart: always
    volumes:
      - ./speedtest/db:/database
    environment:
      MODE: standalone
      TELEMETRY: true
      PASSWORD: REDACTED
      EMAIL: [email protected]
      DISTANCE: mi
    ports:
      - "9065:80"

@bobbyl140
Copy link
Author

@sstidl any update on this? if not sorry to comment.

@sstidl
Copy link
Collaborator

sstidl commented May 18, 2024

This problem is incomprehensible to me. Sorry. It has to be related to something in your own environment.

@sstidl
Copy link
Collaborator

sstidl commented May 18, 2024

I took the exact docker-compose.yml from above and it works on a linux docker host without any modification.
see screenshot:
image

@sstidl sstidl added the wontfix label May 18, 2024
@bobbyl140
Copy link
Author

I’ll see if I can figure it out then, but keep in mind I’m using this through Apache as a reverse proxy. In that image the URL is directly to the container, as shown by the port number. But I’ll see what I can do.

@sstidl
Copy link
Collaborator

sstidl commented May 18, 2024

if you are using a revproxy you have to learn how to forward the correct headers.
look for "X-Forwarded-For"-Header
it depends on your rev-proxy how to configure it right. in my own scenario i use nginx as rev.proxy.

@bobbyl140
Copy link
Author

But like I said, I've set this header globally on my reverse proxy and it works just fine with all other Docker containers I run. For example, the Bookstack container I run in Docker:
Screenshot 2024-05-18 at 4 59 45 PM

@bobbyl140
Copy link
Author

Sorry to bump this but it's been a long time and I still haven't figured it out. Is there anything else I can try?

@sstidl
Copy link
Collaborator

sstidl commented Sep 15, 2024

Sorry to say but this is not a problem related to speedtest. I can't help you there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants