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

Running behind reverse proxy showing wrong IP #111

Open
Joly0 opened this issue Oct 11, 2024 · 3 comments
Open

Running behind reverse proxy showing wrong IP #111

Joly0 opened this issue Oct 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working Fixed in /dev Fixed in /dev build for next update.

Comments

@Joly0
Copy link

Joly0 commented Oct 11, 2024

Hey, i want to run DweebUI behind an nginx reverse proxy and i noticed, that DweebUI seems like not using the X-Real-IP header. I tried to set it, like for most of my other hosts using nginx, but dweebui shows the ip of the docker gateway for the docker networks its using as the ip for various things like logins.
Am i missing something or what could be wrong here?

@lllllllillllllillll lllllllillllllillll self-assigned this Oct 12, 2024
@lllllllillllllillll lllllllillllllillll added bug Something isn't working In-progress labels Oct 12, 2024
@lllllllillllllillll
Copy link
Owner

Hi @Joly0,
Where is the wrong IP being displayed? In the address bar when accessing DweebUI through Nginx?
Could you give me a screenshot?
If you used the compose file in the README, could you try the broken dev version with docker run:
docker run -d --name=DweebUI -p 8000:8000 -v dweebui:/app/database -v /var/run/docker.sock:/var/run/docker.sock lllllllillllllillll/dweebui:v0.7X-dev

@Joly0
Copy link
Author

Joly0 commented Oct 14, 2024

Here in the syslogs is the wrong ip displayed:
image
Here the ip is shown as 172.18.0.1 which is the gateway of the docker network that dweebUI is connected to. Usually the IP of the user that is connected should be shown here, no?
There are only 2 instances where the IP was shown correct and that was the bottom 2 entries where i registered first. But that was without the nginx proxy.
I will try to run the dev image and will report back later if it changes anything.

Also i have found a few other bugs with dweebUI, i probably will open a few other issue reports here

@lllllllillllllillll
Copy link
Owner

lllllllillllllillll commented Oct 14, 2024

@Joly0 Thanks. I still need to test it, but this should be fixed in the next release.
There are definitely a lot more bugs in there.
If you try the dev version out, it includes two settings to reduce or disable the sign-in auth. Which you may want to try if you already have some other form of authentication already.

[Build 469] Added 'trust proxy' to express config and changed syslog to use req.ip instead of req.socket.remoteAddress which should get the forwarded IP address.

@lllllllillllllillll lllllllillllllillll added Fixed in /dev Fixed in /dev build for next update. and removed In-progress labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed in /dev Fixed in /dev build for next update.
Projects
None yet
Development

No branches or pull requests

2 participants