Re: [squid-users] Transparant Caching with iptables

From: deniz aydemir <aydemird@dont-contact.us>
Date: Mon, 10 Dec 2001 10:10:00 -0800 (PST)

Hi SysAdmin,
firstful u havent given a destination parameter
in iptables u may try the following :
 iptables -t nat -A PREROUTING -i eth0 -d 0/0 -p tcp
--dport www -j REDIRECT --to-port 3128

but on the other hand your output from iptables seems
ok.
I suggest u check the port 80 via tcpdump
tcpdump -n port 80 -i eth0
if this command gives output about packets coming
then your router and webcache redirect is good working
else u have problem on router webcach redirect
if no problem check for port 3128
tcpdump -n port 3128 -i eth0
if no output something is wrong with iptables
if gives output no problem:)

--- SysAdmin <squidref@yuktee.net> wrote:
> Hi
>
> I am looking for transparent caching with iptables.
>
> I setup a squid box with Mandrake 8.0 with Kernel
> 2.4.3
>
> I used the following command to redirect the port 80
> requests to 3128 but seams not working
>
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport
> 80 -j REDIRECT --to-port 3128
>
> I checked with my router... it is redirecting the
> packets to the squid box (wccp configured). Nothing
> turning up in access.log
>
> Can any body helpme out?
>
> iptables -t nat -L gave me the following out put
>
> [root@root /root]# iptables -t nat -L
> Chain PREROUTING (policy ACCEPT)
> target prot opt source destination
> REDIRECT tcp -- anywhere anywhere
> tcp dpt:http redir ports 3128
>
> Chain POSTROUTING (policy ACCEPT)
> target prot opt source destination
>
> Chain OUTPUT (policy ACCEPT)
> target prot opt source destination
> [root@root /root]#
>
>
> I could not get where exactly I went wrong? I
> followed the folloing url to setup the transperant
> proxy/caching.
>
>
http://www.linuxdoc.org/HOWTO/mini/TransparentProxy.html
>
> Bhaskar
>
>

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
Received on Mon Dec 10 2001 - 11:10:01 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:05:18 MST