1. Download webhtb "wget http://www.webhtb.ro/downloads/WebHTB_V2.9.bz2"
2. Extract to directory /var/www/ "sudo tar -jxvf WebHTB_V2.9.bz2 /var/www/"
3. Change directory ownership "sudo chown -R www-data:www-data /var/www/webhtb"
4. Activate SSL module on Apache2 "sudo a2enmod ssl"
5. Generate SSL key for apache2
"sudo apt-get install openssl ssl-cert"
"sudo mkdir -p /etc/apache2/ssl"
"sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem"
6. Create Virtual Host for Webhtb "sudo vim /etc/apache2/sites-available/webhtb"
NameVirtualHost *:4437. Activate Virtual Host WebHTB "sudo a2ensite webhtb"
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
ServerAdmin webmaster@localhost
DocumentRoot /var/www/webhtb/
Options FollowSymLinks
AllowOverride All
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
8. Reload your apache2 "sudo /etc/init.d/apache2 force-reload"
9. Install sysvconfig php5-cli php5-snmp "sudo apt-get install php5-cli php5-snmp"
10. Create startup script for WebHTB "sudo cp -r /var/www/webhtb/docs/webhtb /etc/init.d/"
11. Edit startup script "sudo vim /etc/init.d/webhtb" #search this line dir="/var/www/html/webhtb" and change into dir="/var/www/webhtb"
12. Make it executeable "sudo chmod u+x /etc/init.d/webhtb" "chown -R www-data:www-data /var/www/webhtb"
13. Set your root password "sudo passwd root"
14. Browse from another computer to https://your-server-local-ip/setup/index.php
Insert:
* MySQL admin user: root
* MySQL admin password: yourrootpassword
* MySQL WebHTB user: "leave it blank"
* MySQL WebHTB password: "leave it blank"
* MySQL WebHTB password again: "leave it blank"
* MySQL WebHTB databasename: webhtb
* Default interface: eth1 ---> ## Your LAN interface
Now you can manage your internet bandwidth :
1. Add interface --- add your LAN interface
2. Create some class (This is a must!!)
>Class Name : Squid-DNS
>Bandwidth : 10240 (10Mbps)
>Limit : 10240
>Prio :0
>Que : SFQ (Stochastic Fairness Queeing)
3. Add client
>Choose class Squid-DNS
CLIENT : DNS-request
BANDWITDH : 128
LIMIT :128
SRC IP : DNS Server Local IP / Provider (to add more than one IP click Add new src)
4. Add your next client to your CLIENT Class and there you go!!! Read More...