Do you like statistics?

An easy way to get some traffic statistics of your router/ firewall/ switches and all the other stuff that supports snmp is the utility mrtg.

mrtg graph

It helps you to find out quickly if more traffic than usual is passing your line. So you can interact fast if something suspicious is going on…

Whether your hardware supports snmp can be found out using the command:
snmpwalk -v 2c -c public | less

-v = version (2c)
-c = community-password (public)
-ip = ip address of your hardware (

Don’t care too much about the output – it’s enough for the beginning if there is some at all…

In the first step we’re generating a basic config (can be done by hand, but that’s rough work):
cfgmaker -global 'WorkDir: /srv/www/htdocs/mrtg' \
--output=/etc/mrtg.cfg public@ public@

WorkDir: output directory for the graphs
–output: target configuration file
public@ first router
public@ second router / switch / whatever

With the following command you can create some basic web pages:
indexmaker -output=/srv/www/htdocs/mrtg/index.html \
-title="My Title" /etc/mrtg.cfg

-output: target index file
-title: title of the web page
/etc/mrtg.cfg: path to configuration file

To get your statistics updated automatically, insert a cronjob like this:
*/5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg.cfg \