Smbind is a PHP-based tool for managing DNS zones for BIND via the web. Supports per-user administration of zones, error checking, and a PEAR DB database backend.


apt-get update && apt-get install smbind

After install:

1. Firts you need to add the user that runs your web server (default in debian is www-data) to the group that runs the BIND server (default in debian is bind), for example:

usermod -G bind www-data

2.Restart your webserver:

/etc/init.d/apache2 restart

Continue Reading…

Here’s a oneliner bash script that uses wget, sed, awk, and tr to download a video from YouTube.

Tested on Debian and Mac. Just put the code below in a file and make your file executable using:

chmod +x


## Two arguments
# $1 Youtube URL
# $2 You name for the video
wget -c –no-check-certificate –user-agent=”" $1 -qO- | \
sed ‘s/\\u0026/\&/g’| \
awk ‘/fmt_url_map/{gsub(/[\|\"]/,”\n”);print}’ | \
sed -n “/^fmt_url_map/,/videoplayback/p” | \
sed -e :a -e ‘$q;N;2,$D;ba’ | tr -d ‘\n’ | \
sed -e “s/\(.*\),\(.\)\{1,3\}/\1/;s/\\\//g” | \
wget -c –no-check-certificate –user-agent=”" -i – -O $2.flv

After putting in a file and making it executable just go get your YouTube url and fire off the download.
Here’s an example.

./ ‘’ filename_to_save

This will make the file filename_to_save.flv in your dir.


What is mod_evasive?

mod_evasive is an evasive maneuvers module for Apache2 to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and etcetera. mod_evasive presently reports abuses via email and syslog facilities.


apt-get install libapache2-mod-evasive

Activate the mod_evasive module:

In the directory: / etc/apache2/mods-available / Debian Squeeze should already have directive to load the module. Or you just can use the following command:

a2enmod mod-evasive

The configuration:

Continue Reading…

This the solution that I found against Script Injection:

First of all, backup file. htaccess.

Then paste the code below in .htaccess:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]

What is the code doing?

Check if the application contains <script> and if someone try to change the variable values  GLOBALS and  _REQUEST variables.

If this happens, then the browser is closed and the 403 error is returned.

I hope this is usefull. Enjoy


Assuming you have varnish installed on your server and you started to catch the pages on it.Your webserver is now missing the hits to your pages.

Well, that is great for your webserver load, but not too good for your statistics analysis, because /var/log/apache/access_log will miss the hit.

Configure varnishncsa:

We’ll use varnishncsa to get the logs that awstats will be able to analyse like:

varnishncsa [?a] [?b] [?C] [?c] [?D] [?d] [?f] [?I regex] [?i tag] [?n varnish_name] [?P file] [?r file] [?V] [?w file] [?X regex] [?x tag]

Add this line in the /etc/rc.local file:

Continue Reading…

Page 26 of 44« First...10...22232425262728293031...40...Last »