Adding the X-Forwarded-For header would allow any instance of ZNC behind a reverse-proxy to set proper IPs for a cookie, and show the proper IP in webadmin.
Also, an allowed-proxies config variable should be added, as a white-list to prevent abuse.
Adding the X-Forwarded-For header would allow any instance of ZNC behind a reverse-proxy to set proper IPs for a cookie, and show the proper IP in webadmin.
Also, an `allowed-proxies` config variable should be added, as a white-list to prevent abuse.
##
<bountysource-plugin>
---
The **[$5 bounty](https://www.bountysource.com/issues/663-allow-use-of-x-forwarded-for?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue has been claimed at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
</bountysource-plugin>
<!-- github-sync-id:4526196 -->
It's not related to number of users... Each session stores your IP, from which you created that session.
If you try to use another IP with existing session, you get that error. Do you change your IP? Maybe you change your proxies?
You can turn that protection off in global settings of webadmin, but that would decrease security.
It's not related to number of users... Each session stores your IP, from which you created that session.
If you try to use another IP with existing session, you get that error. Do you change your IP? Maybe you change your proxies?
You can turn that protection off in global settings of webadmin, but that would decrease security.
<!-- github-comment-id:5644867 -->
I think what @neersighted is saying, is that he is putting his ZNC behind a reverse proxy. So all the clients are coming from the IP of the proxy. Proxies usually set X-Forwarded headers indicating the real IP/protocol etc.
This sounds like a feature request for an option to follow these headers.
I think what @neersighted is saying, is that he is putting his ZNC behind a reverse proxy. So all the clients are coming from the IP of the proxy. Proxies usually set X-Forwarded headers indicating the real IP/protocol etc.
This sounds like a feature request for an option to follow these headers.
```
x-forwarded-proto: https
x-forwarded-port: 443
x-forwarded-for: 172.16.0.241
```
<!-- github-comment-id:5678151 -->
I have tried this patch https://github.com/MartinMartimeo/znc/commit/44be37a33e0df7df00cd09b2a1d9ff15c0599780 on the latest znc git version (at the time of this writing) and it works perfectly.
<!-- github-comment-id:9666201 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adding the X-Forwarded-For header would allow any instance of ZNC behind a reverse-proxy to set proper IPs for a cookie, and show the proper IP in webadmin.
Also, an
allowed-proxiesconfig variable should be added, as a white-list to prevent abuse.The $5 bounty on this issue has been claimed at Bountysource.
What bug with session cookies?
Whenever more than five or so users use webadmin at once, I tend to get "Invaild Session for your IP" errors.
It's not related to number of users... Each session stores your IP, from which you created that session.
If you try to use another IP with existing session, you get that error. Do you change your IP? Maybe you change your proxies?
You can turn that protection off in global settings of webadmin, but that would decrease security.
I see, that's odd.
I think what @neersighted is saying, is that he is putting his ZNC behind a reverse proxy. So all the clients are coming from the IP of the proxy. Proxies usually set X-Forwarded headers indicating the real IP/protocol etc.
This sounds like a feature request for an option to follow these headers.
Yes, that's what I meant.
bump.
bump +1 for this proxying stuff like this down with apache is common stuff and should work
Also, nginx usually uses
X-Real-IP, orX-Forwarded-For, so both should be supported.The latest nginx configs you cen get from the wiki contain both headers in the include file that's used.
I have tried this patch https://github.com/MartinMartimeo/znc/commit/44be37a33e0df7df00cd09b2a1d9ff15c0599780 on the latest znc git version (at the time of this writing) and it works perfectly.
Please implement this!
Someone should fix https://github.com/MartinMartimeo/znc/commit/44be37a33e0df7df00cd09b2a1d9ff15c0599780 up
This is implemented in #349