Networking Forums

Networking Forums > Computer Networking > Linux Networking > how to make squid transparent ?

Reply
Thread Tools Display Modes

how to make squid transparent ?

 
 
Sanal Kisi
Guest
Posts: n/a

 
      03-22-2005, 01:33 PM
On my RHAS3 I have 2 NICs, one connected to internet with real IP
and the other connected to my local LAN.

With some gentle help from this group I have managed to set up the
required iptables rule

iptables -t nat -A POSTROUTING -s localNet/LocalMask -o eth0 -j SNAT
--to-source realIP_of_my_RH

on this server so that my RH now acts as a
gateway/nat/router for my local workstations reaching internet. I even
managed to configure a DHCP server for distributing local IP's.

I even managed issuing apropriate iptables command (listed below) so
that all the traffic of different real IP's would be forwarded
directly to seperate local IP's, allowing my local servers within NAT
to provide service to internet outside users, individually.

***************************************
ifconfig eth0:0 secondary_real_IP and_its_mask

iptables -t nat -A PREROUTING -d secondary_real_IP -j DNAT --to
local_IP

iptables -t nat -A POSTROUTING -s local_IP -j SNAT --to
secondary_real_IP
***************************************

I have also managed to install squid (2.5.STABLE9-20050321) and
configure it to act as a cache-server for the local clients.

What I want to do now is to configure my gateway to act as a
transparent-caching-proxy for the internal clients, so that no one
would have to modify their own web-browsers for proxy settings.

After reading, I have issued the command

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT
--to-port 3128

from the site http://www.tldp.org/HOWTO/TransparentProxy.html but with
no success.

Thanks for any kind of help.

Regards.




 
Reply With Quote
 
 
 
 
Jose Maria Lopez Hernandez
Guest
Posts: n/a

 
      03-22-2005, 02:37 PM
Sanal Kisi wrote:
> After reading, I have issued the command
>
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT
> --to-port 3128
>
> from the site http://www.tldp.org/HOWTO/TransparentProxy.html but with
> no success.


Have you done the part of this document called Setting up squid?
If you don't configure squid as a transparent proxy it won't work.

> Thanks for any kind of help.
>
> Regards.


Regards.

--

Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
(E-Mail Removed)
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
-- Jack Kerouac, "On the Road"
 
Reply With Quote
 
Sanal Kisi
Guest
Posts: n/a

 
      03-23-2005, 06:24 AM
Sorry for bothering.

My mistake was using the wrong eth name within the the command

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT
--to-port 3128

Everything works just fine now.

Thanks anyway.

On Tue, 22 Mar 2005 16:37:01 +0100, Jose Maria Lopez Hernandez
<(E-Mail Removed)> wrote:

>Sanal Kisi wrote:
>> After reading, I have issued the command
>>
>> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT
>> --to-port 3128
>>
>> from the site http://www.tldp.org/HOWTO/TransparentProxy.html but with
>> no success.

>
>Have you done the part of this document called Setting up squid?
>If you don't configure squid as a transparent proxy it won't work.
>
>> Thanks for any kind of help.
>>
>> Regards.

>
>Regards.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
client source address with squid transparent proxy awrightus@gmail.com Linux Networking 0 12-31-2008 01:42 PM
debian Etch transparent squid proxy error messages Olaf Petzold Linux Networking 9 10-11-2006 10:22 PM
transparent proxy - iptables+ squid+2 routers Igor Linux Networking 3 10-13-2005 03:54 AM
FC3/Kernel 2.6, Fast Switching, Transparent Proxy, Squid, WCCP Help!!!!! swoolley@adstelecom.com Linux Networking 0 05-19-2005 01:03 AM
Transparent proxy with Squid and Apache problem Tobias Skytte Linux Networking 0 11-21-2003 08:20 AM



1 2 3 4 5 6 7 8 9 10 11