On Fri, 19 Nov 2004, Declan Grady wrote:
> Hi,
> Im running squid as a proxy server for my lan, I have a digiweb
> satellite connection, which has a specific IP address & port number
> which seems to be alot faster for browsing than doing a direct
> onward connect on port 80 from squid.
>> How can I use iptables to redirect my http traffic so that it uses
> this IP address and port number, like a another proxy server ?
You can tell squid to use that other proxy:
cache_peer <proxy> parent <proxyport> 0 default
And you might want to set:
prefer_direct on
For iptables, I have the the following chain in my 'nat' table:
Chain trans-proxy (1 references)
target prot opt source destination
RETURN tcp -- anywhere hibernia.jakma.org tcp dpt:http
RETURN tcp -- anywhere hibernia.jakma.org tcp dpt:http
REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 8080
And then have following in my PREROUTING chain (in nat table):
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
trans-proxy all -- anywhere anywhere
regards,
--
Paul Jakma paul at clubi.iepaul at jakma.org Key ID: 64A2FF6A
Fortune:
Law stands mute in the midst of arms.
-- Marcus Tullius Cicero
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!