LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Double Proxy with Squid and iptables (http://www.linuxquestions.org/questions/linux-networking-3/double-proxy-with-squid-and-iptables-491752/)

SatelliteThief 10-12-2006 08:43 AM

Double Proxy with Squid and iptables
 
Good Day

I am trying to setup a Linux computer with Squid as a proxy server (Proxy A). I need to route all http and https traffic from Proxy A to Proxy B on another reachable network. This is what I have setup so far.

Client -> Proxy A -> Proxy B -> Web Site

I used iptables with the nat table to reroute outgoing traffic from Proxy A as follows: iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination [ProxyB]:8080
AND for HTTPS
iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination [ProxyB]:8080

I setup Squid as a proxy and it works with HTTP but when I try to access a HTTPS site my browser gives an error that it can't reach the host.

I can access other HTTPS sites through only 1 proxy eg. Client -> ProxyA -> HTTPS site works but Client -> ProxyA -> ProxyB -> HTTPS site gives an error.
Also Client -> ProxyB -> HTTPS site works.

I can't seem to find the problem and would appreciate any help.

Thank-you

SatelliteThief 10-18-2006 06:38 AM

Proxy
 
Good Day

It seems I can't use iptables to make linux use a proxy. Does anyone know how to setup Squid to use another proxy to access the web?

Thanks


All times are GMT -5. The time now is 05:18 PM.