OK the last one: IP Accounting
Sun, 23 Jun 2002 10:04:27 +0200
> iptables -A httpd_accounting -p tcp --dport 80
> iptables -A INPUT -p tcp --dport 80 -j httpd_accounting
> iptables -A OUTPUT -p tcp --dport 80 -j httpd_accounting
> Now I'm finished !!?
I don't think so.
> You think this is OK?
> Or do I count some traffic twice?
> And, of course, have i counted ALL the traffic?
You now count traffic from clients to your HTTP server, as well as
packets from your server machine to OTHER HTTP servers.
In the OUTPUT chain rule, change "--dport" to "--sport", and then you
will be finished, and count both packets to and from your port 80.
In general, when going from INPUT rules to OUTPUT rules for the same
thing, switch sources and destinations.