Problem - Untangle does not show, for free, bandwidth usage, a huge omission in my opinion especially when all the other competitive products do, for free.
Goal - I am trying to install BandwidthD on Untangle 9.1 (x32/Debian) and am running into trouble with what I suspect is the Apache(2?) part of the install. Once completed I have begun and will complete a literal step by step on how to accomplish this for users interested and post it here as well as the Untangle forums.
I have referenced the following links that specifically discuss this for Untangle. The problem is that the authors assume you already know a bit about Linux/Unix and Apache. This seems to be a quite common issue on all Linux/Unix forums unfortunately.
German Page with English translation at the bottom: http://www.3open.org/d/untangle/untangle
Apache info on links and Available/Enabled websites: http://www.debuntu.org/2006/02/22/7-virtual-hosting-using-apache-2
What I have done thus far:
Enabled remote SSH ability on Untangle.
Using PUTTy to access the Untangle unit via SSH remotely.
Using WINSCP to place files on the Untangle unit.
Untangle is in Router mode (not bridge)
IP is 192.168.0.218 for access
Copied BandwidthD "SARGE-bandwidthd_2.0.1_i386.deb" to root /tmp
Used Putty and ran "dpkg -i SARGE-bandwidthd_2.0.1_i386.deb "
/tmp # dpkg -i SARGE-bandwidthd_2.0.1_i386.deb
(Reading database … 50306 files and directories currently installed.)
Preparing to replace bandwidthd 2.0.1 (using SARGE-bandwidthd_2.0.1_i386.deb) …
Stopping BandwidthD: bandwidthd.
Unpacking replacement bandwidthd …
Setting up bandwidthd (2.0.1) …
update-rc.d: warning: /etc/init.d/bandwidthd missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Starting BandwidthD: bandwidthd.
Processing triggers for man-db …
After this, using both websites that talk about the install, I am lost on what to do with Apache. I have tried creating the files bandwidth.conf and adding their respective lines and even restarted the Untangle unit, but no dice. I know it is me, but can someone help with what to do after the BandwidthD install and Apache configuration?
Thanks much for you time!
Okay, so if I am understanding you correctly, you need to use bandwidthd in conjunction with Untangle to monitor network traffic. And you'll be using apache2 to view the traffic reports. For that, I recommend setting it up to use postgres sql database to store the traffic information and then generate the graphs and charts dynamically. On debian I found setting it up to do that via the debian package was a bit more work than it was worth. Make sure you have postgresql installed (postgresql-9.0 and postgresql-server-dev-9.0) then run su -c 'apt-get build-dep bandwidthd' . That should get you all the libraries needed for bandwidthd with postgres support. Then it is a simple matter of calling apt-get source bandwdithd from a scratch directory (/tmp or similar). You can then call debuild in the just created bandwidthd directory. (If it fails, make sure you have devscripts installed, but don't worry if it fails running debsign, you don't need that.) Or you can use the usual ./configre && make. While that runs, go into <pwd>/etc, where you'll find bandwidthd.conf. Edit it: set the subnet mask you want, and the device uncomment output_cdf and set it to false. Do the same for the #graph line, then add to the bottom pgsql_connect_string "user = <posgtres user name> password = '<postgres user password>' dbname = bandwidthd host = localhost", then run su -c 'su postgres' and then run psql.
From inside psql, call "create user <postgre user name> with password '<postgres user password>';"
Then "create database bandwidthd;"
Then "grant all privileges on bandwidthd to <postgres user name>"
^D or \q to exit, then ^d or exit to exit. Once that is done, wait for the compilation to finish.
Once it's done compiling and you've adjusted the config file and set up postgres, you should have an executable called bandwidthd in the same directory, run it as root (./bandwidthd -D -c etc/bandwidthd.conf) and watch /var/log/syslog (tail -f /var/log/syslog) for messages. You should see the interface listed in the conf file enter promiscuous mode; after ~200 seconds it will create the tables in the database and you can start pulling data. To pull data through apache2, copy the phphtdocs to /var/www/bandwidthd-php, you then should be able to go to http ://localhost/bandwidthd-php/index.php and see what bandwidth has to offer. If you get stuck with any particular part, post here and I'll be happy to help.
Thanks so much for the info, I was able to get this rolling and have created a step by step on how to do this if you're unfamiliar with linux, as I am. Working great for now.
Thanks for taking the time to write all your info, will think about going the SQL route.
Log in to post a comment.