I have a CentOS 6 box running Squid and Privoxy to create a custom proxy setup. The server has several public IPv4 addresses configured on virtual
I want to send all proxy traffic through a specific IPv4 address that is setup on the server, but is not the default IP.
All proxy traffic is being sent through the default IP of the
eth0 interface. I don't want this IP to be used.
I am using both Squid and Privoxy in my proxy.
My squid install is configured on an external IPv4 address
http_port x.x.x.x:8080and is what a client uses to connect to the proxy.
Squid is using
cache_peer to connect to a local Privoxy server running on the same server.
Privoxy is setup as local only and has a
127.0.0.1:8118 (localhost only). Privoxy does further filtering, that Squid otherwise cannot do.
Privoxy does not do any additional forwarding but filters and modifies header information.
What I've tried:
I tried using
tcp_outgoing_address x.x.x.x in Squid, however this causes a "Zero Sized Reply" error when applied in the config. This is because of Privoxy being involved in the chain. If I removed Privoxy from the chain it works. Similarly I used
POSTROUTING with iptables and got the same error trying to change the source IP.
I would like assistance in finding a working solution to get my proxy traffic routed through a user specified IPv4 address, with Squid and Privoxy connected together. I am open to any setup changes required for this to work.