Apache unreliable REMOTE_ADDR

Apache unreliable REMOTE_ADDR

Post by Dr » Fri, 09 Nov 2001 05:44:57



On SuSE 6.4 with Samba 2.0.10 and lots of W95/98 clients....

Apache 1.3.12 sometimes returns incorrect REMOTE_ADDR values to a bash
cgi script.  When it does, the addresses seem to lie in a limited
range of values from 172.16.1.27 to 172.16.1.35 inclusive.  Rapid
repeated calls to the .cgi  from a single client result in different
values from this small set of addresses, apparently at random.  The
return message routing is OK - the .cgi output always gets back.

On the other hand, when Apache isn't misbehaving like this it seems
quite solid.  In our computer suite of 30 identical(ish) W98SE
machines it will be solid on one terminal whilst misbehaving on an
adjacent one visiting the same, stable, web page and .cgi script.

The subnet is 172.16.91.xxx so only the two low order bytes of the IP
address are affected.  Error log and connection log do not record
anything during these episodes.

Any ideas?  Is it an apache bug, a W98 'feature' or a problem in  my
fingers?

DrC

 
 
 

Apache unreliable REMOTE_ADDR

Post by Joe Schaefe » Fri, 09 Nov 2001 13:53:04



> The subnet is 172.16.91.xxx so only the two low order bytes of the IP
> address are affected.  Error log and connection log do not record
> anything during these episodes.

> Any ideas?  Is it an apache bug, a W98 'feature' or a problem in  my
> fingers?

Never seen anything like it- I'd double check that you don't have a
DHCP / dynamic routing problem somewhere by disabling DHCP on a few
windows boxes, hardwiring their IP addresses and routing tables, and
then running the tests again.  Also try running tcpdump on the server
box and record the IP address as reported by the kernel.

--
Joe Schaefer

 
 
 

Apache unreliable REMOTE_ADDR

Post by Marc Slem » Fri, 09 Nov 2001 16:42:13



>On SuSE 6.4 with Samba 2.0.10 and lots of W95/98 clients....

>Apache 1.3.12 sometimes returns incorrect REMOTE_ADDR values to a bash
>cgi script.  When it does, the addresses seem to lie in a limited
>range of values from 172.16.1.27 to 172.16.1.35 inclusive.  Rapid
>repeated calls to the .cgi  from a single client result in different
>values from this small set of addresses, apparently at random.  The
>return message routing is OK - the .cgi output always gets back.

Are you sure some of the systems aren't setup to use a proxy?
Either explicitly in the proxy config in the browser, or via one of
the hellish abominations against nature that are often called
transparent proxies?
 
 
 

Apache unreliable REMOTE_ADDR

Post by Dr » Sat, 10 Nov 2001 07:06:20




> >On SuSE 6.4 with Samba 2.0.10 and lots of W95/98 clients....

> >Apache 1.3.12 sometimes returns incorrect REMOTE_ADDR values to a bash
> >cgi script.  When it does, the addresses seem to lie in a limited
> >range of values from 172.16.1.27 to 172.16.1.35 inclusive.  
> Are you sure some of the systems aren't setup to use a proxy?
> Either explicitly in the proxy config in the browser, or via one of
> the hellish abominations against nature that are often called
> transparent proxies?

Amazing how the human brain works.  After struggling for two days to
make sure I really knew what was happening, I post a call for help,
and an hour or so later realise it's probably a proxy problem.  I've
checked today, and it is.

The server and all the clients are on my own subnet behind a distant
firewall, but the W98 checkbox 'do not proxy hosts on local subnet'
doesn't seem to work.  The terminals with their own subnet explicitly
excluded are OK.  Those relying on the checkbox talk to the upstream
proxy which obligingly relays the messages back to my server.

So it's a bit of W98 (I think?), a bit of finger trouble in my area,
and thank you all (especially Marc!) for being there to take the
pressure off!

DrC