Installing vnstat

VPS and dedicated server security tips. Preventing from attacks, ddos and more.

Installing vnstat

Postby Mark » Thu Dec 31, 2009 2:31 pm

vnStat is a network traffic monitor for Linux that keeps a log of daily network traffic for the selected interface. vnStat isnt a packet sniffer. The traffic information is analyzed from the /proc -filesystem, so vnStat can be used without root permissions.

Installing:

# cd /usr/local/src
# wget http://humdi.net/vnstat/vnstat-1.4.tar.gz
# tar -zxvf vnstat-1.4.tar.gz
# cd vnstat-1.4
# make && make install
# vnstat -u -i eth0

Making vnstat root only:

# chmod 700 /usr/bin/vnstat
# chmod 700 /var/lib/vnstat/ -R

Now you can check the stats, use help for possible commands:

# vnstat –help
Mark
 
Posts: 124
Joined: Fri Dec 11, 2009 2:18 pm

Return to Securing your server

Who is online

Users browsing this forum: No registered users and 1 guest

cron