Page 1 of 1

Squid Proxy inside VPN

Posted: Fri Jul 12, 2019 4:26 am
by MaxLu
Hi all!
I have a squid server on a VPN client and a VPN server with WAN IP
I use a port forwarder (rinetd) on VPN server to redirect user request to Squid Server
I want squid logs user public IP instead VPN server IP

This is an example:
User (Wan IP: 199.9.9.9) connects to VPN server by public IP (Wan IP: 188.8.8.8 - VPN IP: 10.8.0.1) on port 3128
User's request is forwarded to Squid server on VPN client (VPN IP: 10.8.0.10) on same port 3128
Squid works but logs 10.8.0.1 instead of 199.9.9.9 on access.log

Does anyone have a solution to propose to me?
Thank you in advance

Re: Squid Proxy inside VPN

Posted: Wed Jun 15, 2022 6:49 pm
by zohaib09
I have installed openvpn and squid on same server. I want vpn client browsing should go through squid without setting up client browser serting

There must be need to define iptable rule? Please advice rule how to accomplish this

Re: Squid Proxy inside VPN

Posted: Wed Apr 26, 2023 2:23 am
by Geo.Rios
Hey zohaib09 Lograste configurarlo?

Re: Squid Proxy inside VPN

Posted: Wed Apr 26, 2023 6:06 pm
by Magvegva
Geo.Rios wrote:
Wed Apr 26, 2023 2:23 am
Hey zohaib09 Lograste configurarlo?
Hello!
Try to use iptables to redirect specific tcp port (80,443) to squid proxy server. Something like this
iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner root --dport 443 -j REDIRECT --to-port 8080