linuxnooby wrote:
> Thanks Jose
>
> what does this look like (assuming eth0 is outside interface)??
> also how do i view the counters??
>
>
> iptables -N DOWNLOADS
> iptables -A INPUT -i eth0 -j DOWNLOADS
> iptables -A FORWARD -i eth0 -j DOWNLOADS
> iptables -A DOWNLOADS -j RETURN
>
> iptables -N UPLOADS
> iptables -A OUTPUT -o eth0 -j UPLOADS
> iptables -A FORWARD -0 eth0 -j UPLOADS
> iptables -A UPLOADS -j RETURN
Yes, that's what I do. Then you can use iptables -L UPLOADS -xvn
to get the counters and you can use bash or perl to extract the
counters from the output of iptables.
If you are gonna use a lot of this kind of chains and you want
to check a lot of counters you better use a C program using
libiptc to check the counters, or it will be very slow.
> thanks
> Dave
Regards.
--
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
(E-Mail Removed)
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA
The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
-- Jack Kerouac, "On the Road"