Linux Netfilter discussions
 help / color / mirror / Atom feed
* Problems with Transparent Proxy using IPTables, Squid and 2.6 kernel
@ 2004-01-08 16:56 Peter Schobel
  2004-01-08 17:02 ` Antony Stone
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Schobel @ 2004-01-08 16:56 UTC (permalink / raw)
  To: netfilter

I have a server that was running a transparent redirection proxy - i 
was using 2.4.20 kernel on this system and i recently upgraded to 
2.6.0.107 kernel package for redhat 9

Ever since i did the kernel upgrade the proxy does not work correctly.

As far as I know, the kernel is configured properly

lsmod shows these iptables modules

Module                  Size  Used by
ipt_REDIRECT            2048  0
iptable_nat            20140  1 ipt_REDIRECT
ip_conntrack           28464  2 ipt_REDIRECT,iptable_nat
iptable_filter          2688  0
ip_tables              15104  3 ipt_REDIRECT,iptable_nat,iptable_filter

my INPUT, FORWARD and OUTPUT policies are all set to accept

iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

I am using this iptables rule

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

my nat table looks like this

iptables -t nat --list

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

ip forwarding is enabled

cat /proc/sys/net/ipv4/ip_forward
1

squid is running on 3128 - the squid config looks like this

acl all src 0/0

visible_hostname proxyhost.porchlight.ca

http_port 3128

no_cache deny all

redirect_program /usr/local/bin/redirector.pl
redirect_children 5
redirect_rewrites_host_header on
redirector_access allow all

http_access allow all
http_reply_access allow all

httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

This configuration has not changed since before the kernel upgrade 
except that there were a couple of rules preventing proxy access to the 
outside world which I removed in order to make things as simple as 
possible for debugging purposes

I can see by running snort that the packets destined for the remote 
host are arriving on the interface

I can see using "iptables -t nat --list -v -n" that the number of 
packets on the REDIRECT rule gets incremented by 1 each time I try to 
access a remote site - but the browser just times out waiting for a 
reply and the squid access.log does not record the access

If i type http://proxyhost.porchlight.ca into the address bar of the 
browser, the port redirect works perfectly and squid redirects the 
traffic to the proxied site without problem - it is only when I attempt 
to access remote sites that the redirection does not work.  As I 
mentioned before - this was all working and tested previous to the 
kernel upgrade.

I've been struggling with this for a couple days now.  Does anyone have 
any idea why this configuration is not working?

Thx in advance,


*****************************
Peter Schobel
Network Administrator
Porchlight.ca
Unlimited Internet
*****************************
In a world without walls or fences
We will have no need for gates or windows
*****************************



^ permalink raw reply	[flat|nested] 24+ messages in thread
[parent not found: <200401082133.38574.Alistair Tonner <>]
[parent not found: <200401090950.56343.Alistair Tonner <>]
[parent not found: <200401100026.01870.Alistair Tonner <>]

end of thread, other threads:[~2004-01-13  5:47 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-08 16:56 Problems with Transparent Proxy using IPTables, Squid and 2.6 kernel Peter Schobel
2004-01-08 17:02 ` Antony Stone
2004-01-08 17:28   ` Peter Schobel
2004-01-08 17:35     ` Antony Stone
2004-01-08 18:28       ` Peter Schobel
2004-01-08 18:51         ` Antony Stone
2004-01-08 20:05           ` Peter Schobel
2004-01-08 21:07             ` Antony Stone
2004-01-08 21:45               ` Sven Schuster
2004-01-08 22:03                 ` Peter Schobel
2004-01-08 21:56               ` Peter Schobel
2004-01-09  2:33             ` Unknown, Alistair Tonner
     [not found] <200401082133.38574.Alistair Tonner <>
2004-01-09  3:58 ` Peter Schobel
2004-01-09 14:50   ` Unknown, Alistair Tonner
2004-01-10  2:08 ` Peter Schobel
2004-01-10  5:26   ` Unknown, Alistair Tonner
2004-01-11 17:00   ` Mark E. Donaldson
2004-01-12 20:09     ` Peter Schobel
     [not found] <200401090950.56343.Alistair Tonner <>
2004-01-09 16:57 ` Peter Schobel
     [not found] <200401100026.01870.Alistair Tonner <>
2004-01-12 20:04 ` Peter Schobel
2004-01-12 20:57   ` Peter Schobel
2004-01-12 21:31     ` John A. Sullivan III
2004-01-12 22:45       ` Peter Schobel
2004-01-13  5:47         ` Arthur Meyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox