* Complex problem
@ 2003-03-31 15:05 Daniel Draper
0 siblings, 0 replies; only message in thread
From: Daniel Draper @ 2003-03-31 15:05 UTC (permalink / raw)
To: netfilter
Hello everyone,
I am working on a complex problem and I'm not quite sure how to solve
it. I have a squid proxy and iptables set up on my server and I want to
account packets going to and from the server inside the LAN.
The accounting rules were easy but I needed to modify squid to set the
tos header depending on whether the requested page was a hit or a miss
(I have now almost done this: squid-gpm.sourceforge.net). Thus on the
OUPUT chain I accounted packets matching the ToS indicating a miss (that
is; it used the external interface) eg;
iptables -A OUTPUT -p tcp --sport 3128 -d 192.168.0.0/24 -m tos
--tos 0x4
However, and here is the tricky bit, I want to account incoming data
from the clients too (ie; a page request) but only if squid is GOING to
assert the tos header to indicate a miss. How can I store the byte count
temporarily and then append it to the byte counter on the input chain if
and only if the right ToS value was detected on the return in the output
chain?
I don't mind hacking netfilter source code if I have to but can anyone
think of a way to do it without source code modification? If not, how
would I go about modifying the source.
Thanks for any suggestions.
Regards,
Daniel Draper,
Boxen Systems, Australia
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-31 15:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-31 15:05 Complex problem Daniel Draper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox