Using squid and Port forward #633

Closed
opened 2026-10-05 04:35:10 +02:00 by adam · 7 comments
Owner

Squid has only ports 80 and 443 open on remote machine.

ZNC on local machine with port 7000 (web interface) port forwarded from 80.

From remote machine browser accessing the server:80 brings up the znc interface.

Although , on logging in with admin user/pass ; it has the "Access Denied" error. With squid bypassed, normal logging in takes place. Any logs which I can bring up ?

The following error on logging in from remote machine.

Access denied

This session does not belong to your IP.

ZNC - http://znc.in

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27976768-using-squid-and-port-forward?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
Squid has only ports 80 and 443 open on remote machine. ZNC on local machine with port 7000 (web interface) port forwarded from 80. From remote machine browser accessing the server:80 brings up the znc interface. Although , on logging in with admin user/pass ; it has the "Access Denied" error. With squid bypassed, normal logging in takes place. Any logs which I can bring up ? The following error on logging in from remote machine. > Access denied > > This session does not belong to your IP. > > ZNC - http://znc.in ## <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27976768-using-squid-and-port-forward?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:115154855 -->
adam closed this issue 2026-10-05 04:35:10 +02:00
Author
Owner

May you draw a scheme what is 'local machine', 'remote machine', where is browser, what port is forwarded to where, etc?

This error means that at first ZNC see you connecting from one IP, then with the same cookie from another IP. That could be because of e.g. #593
If there is a valid reason to change IP, and if you're brave, you can turn off that protection.

May you draw a scheme what is 'local machine', 'remote machine', where is browser, what port is forwarded to where, etc? This error means that at first ZNC see you connecting from one IP, then with the same cookie from another IP. That could be because of e.g. #593 If there is a valid reason to change IP, and if you're brave, you can turn off that protection. <!-- github-comment-id:153897692 -->
Author
Owner

Also, depending on your setup, TrustedProxy setting may be useful

Also, depending on your setup, TrustedProxy setting may be useful <!-- github-comment-id:153898400 -->
Author
Owner

http://imgur.com/I77juAJ

Here is an amateur schematic.

:)

http://imgur.com/I77juAJ Here is an amateur schematic. :) <!-- github-comment-id:153930252 -->
Author
Owner

Squid is not Under my control.

Squid is not Under my control. <!-- github-comment-id:153930437 -->
Author
Owner

If you clear cookies, and don't switch between proxy and direct connection, ZNC will see you connecting from only one IP.
If you switch between proxy and direct connection, ZNC sees 2 connections from 2 different IPs but with the same cookie.

If you clear cookies, and don't switch between proxy and direct connection, ZNC will see you connecting from only one IP. If you switch between proxy and direct connection, ZNC sees 2 connections from 2 different IPs but with the same cookie. <!-- github-comment-id:154381304 -->
Author
Owner

There was option of different IP sessions under global settings. I deselected it and now znc doesn't complain.

Thanks for this.

Although , irc connections to 7000 do not work via the squid server. A pain in ass really.

There was option of different IP sessions under global settings. I deselected it and now znc doesn't complain. Thanks for this. Although , irc connections to 7000 do not work via the squid server. A pain in ass really. <!-- github-comment-id:154478901 -->
Author
Owner

I don't see what else can be done here. ZNC has no control over how client connects to it, and whether there are any proxies in between.

I don't see what else can be done here. ZNC has no control over how client connects to it, and whether there are any proxies in between. <!-- github-comment-id:450725159 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#633