Howto: Vnstat with frontend on pfSense
-
Based on:
http://nixfloyd.blogspot.com/search?q=vnstatOther links:
http://humdi.net/vnstat/
http://www.sqweek.com/sqweek/index.php?p=1Comment:
Since the GD image libraries ain't present in pfSense no graph will be shown.
It could be made as a package but a waste of time imo.–---------------------------------------------The Guide---------------------------------------------------------------------------
Enable ssh access in pfsense gui
Use putty to login to server using root as username and press 8 for shellpkg_add -r ftp://ftp4.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All/vnstat-1.6_2.tbz
Exit
Press 5 to reboot
( Use putty to login to server using root as username and press 8 for shell )
type ifconfig to list the names of availible interfaces. In this case vlan0 (Wan) vlan1 (Lan) will be used
vnstat -u -i vlan0
vnstat -u -i vlan1
ee /cf/conf/config.xml
add following lines under
<minute>/5</minute>
<hour></hour>
<mday></mday>
<month></month>
<wday>*</wday>
<who>root</who>
<command></command>/usr/local/bin/vnstat -upress ESC then A then A to save
fetch http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.3.tar.gz
tar zxvf vnstat_php_frontend-1.3.tar.gz
mv vnstat_php_frontend-1.3 /usr/local/www/vnstat
ee /usr/local/www/vnstat/config.php
adjust the following lines to your preference:
$iface_list = array('vlan0', 'vlan1');
$iface_title['vlan0'] = 'WAN';
$iface_title['vlan1'] = 'LAN';
$vnstat_bin = '/usr/local/bin/vnstat';press ESC then A then A to save
Exit
Press 5 to reboot
Goto http://192.168.1.1/vnstat to view ( Data will show after 5 min )