Redirect to same LAN and preserve source IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi :)

This is a topic that's come up a couple of times recently and I wondered if 
there was some super-high-powered incantation I could use...

Presently, I'm running squid on the same machine that the LAN uses for 
Internet access, so I'm doing a simple 

$IPT -A PREROUTING -s 10.0.0.0/255.255.255.0 -i eth1 -p tcp -m tcp --dport 80 
-j REDIRECT --to-ports 3128

and this preserves the IP address of the LAN machine which made the request, 
which is what we want for the log files.

However, I need to change the 10.0.0.254 'defaut gateway' machine to a 
standalone router, and the squid installation will be then on a seperate 
machine. Is there any way I can 'grab' the outgoing requests on port 80, and 
shove them into port 3128 on another machine and preserve the correct source 
IP, rather than everything being marked with the IP of the gateway 
10.0.0.254 ?

Cheers,
Gavin.


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux