iptables Problem (Traffic-Messung)
Posted: 2005-07-04 18:17
Hallo!
Für servserstats würde ich jetzt gerne noch Traffic messen, und das am besten mit iptables, so dass ich kein snmp mehr brauche (damit mache ich das heute). Ich muss aber gestehen dass ich kein großer IP-Tables Fachmann bin, da ich bisher noch nie ernsthaft einen Paketfikter benötigt hätte.
Ich habe bisher folgende Regeln definiert:
Jetzt hätte ich gerne noch eine Chain, die alle Pakete loggt, also den gesamten Traffic der anfällt aufzeichnet.
Ich hab das dann mal so probiert:
Aber das geht nicht (bleibt auf 0). Wie mache ich das am besten?
Grüße
Andreas
Für servserstats würde ich jetzt gerne noch Traffic messen, und das am besten mit iptables, so dass ich kein snmp mehr brauche (damit mache ich das heute). Ich muss aber gestehen dass ich kein großer IP-Tables Fachmann bin, da ich bisher noch nie ernsthaft einen Paketfikter benötigt hätte.
Ich habe bisher folgende Regeln definiert:
Code: Select all
# Log WWW-Traffic and accept it
iptables -N HTTP
iptables -A INPUT -p tcp -m tcp --dport 80 -j HTTP
iptables -A OUTPUT -p tcp -m tcp --sport 80 -j HTTP
iptables -A HTTP -j ACCEPT
# rules for HTTPS
iptables -N HTTPS
iptables -A INPUT -p tcp -m tcp --dport 443 -j HTTPS
iptables -A OUTPUT -p tcp -m tcp --sport 443 -j HTTPS
iptables -A HTTPS -j ACCEPT
# rules for SSH
iptables -N SSH
iptables -A INPUT -p tcp -m tcp --dport 22 -j SSH
iptables -A OUTPUT -p tcp -m tcp --sport 22 -j SSH
iptables -A SSH -j ACCEPT
# rules for RSYNC
iptables -N RSYNC
iptables -A INPUT -p tcp -m tcp --dport 873 -j RSYNC
iptables -A OUTPUT -p tcp -m tcp --sport 873 -j RSYNC
iptables -A RSYNC -j ACCEPTIch hab das dann mal so probiert:
Code: Select all
iptables -N ALL
iptables -A INPUT -p tcp -m tcp -j ALL
iptables -A OUTPUT -p tcp -m tcp -j ALL
iptables -A ALL -j ACCEPTGrüße
Andreas