[squid-users] Redirect proxy traffic to another server.

From: <dmalvin@dont-contact.us>
Date: Mon, 22 Nov 2004 11:52:17 -0600

I'm not sure if what I'm attempting to do is possible and/or if I'm doing it correctly. I'd like to redirect our proxy traffic to another server so I don't have to reconfigure all the client machines.

I have two functional squid proxy servers, a production server (server1, 192.168.0.1:8080) and a test/backup server (server2, 192.168.0.2:8080). I'd like to recompile squid on server1 (I want to add some options). So, while squid is down on server1 I want to forward all request to server2. What I've done so far is add these iptables rules on server1 in attempt to forward the proxy traffic to server2:
iptables -t nat -I PREROUTING -p tcp -d 192.168.0.1 --dport 8080 -j DNAT --to 192.168.0.2
iptables -I FORWARD -s $MY_IP_ADDRESS -p tcp -d 192.168.0.2 -j ACCEPT

A tcpdump on server2's internal NIC shows it's receiving the redirected traffic but a tcpdump on server2's external NIC show no attempt to retrieve the requested website.

Again I ask, is this possible and am I going about it the right way?
Received on Mon Nov 22 2004 - 10:52:20 MST

This archive was generated by hypermail pre-2.1.9 : Wed Dec 01 2004 - 12:00:01 MST