This bash script was cread for you to help you to set up a VPN that will let you do many things.

This bash script is based primarily on another tutorials, but I have updated and I added some more infos.

This is the script:

# OpenVPN install script
# Tested on Debian Squeeze
# Please submit feedback and questions at [email protected]

ip=`grep address /etc/network/interfaces | grep -v | awk ‘{print $2}’`
apt-get update
apt-get install openvpn libssl-dev openssl
cd /etc/openvpn/
cp -R /usr/share/doc/openvpn/examples/easy-rsa/ /etc/openvpn/
cd /etc/openvpn/easy-rsa/2.0/
chmod +rwx *
. ./vars
source ./vars

echo -e “\n\n\n\n\n\n\n” | ./build-ca

Continue Reading…

The Spamhaus Project is one of the largest anti-spam DNS blacklist services known. Founded in 1998, Spamhaus has operations in Geneva, Switzerland, and London in addition to the 28 investigators and forensic specialists located in 8 countries. Spamhaus is a true 24 hour a day anti-spam operation. With over 60 public DNS Servers distributed across 18 countries, Spamhaus is able to serve billion of DNS requests to the world over, all free of charge. It has been estimated that 1.4 billion users mailboxes are in some way protected by The Spamhaus Project every day.

Here, I will show you a script that automatically blocks IPs blocked by Spamhaus:



echo “”
echo -n “Deleting DROP list from existing firewall…”

Continue Reading…

There is a simple way to call a simple bash script inside php script page:

- Below is a simple bash script called

echo “Successful call test script“
exit 0

You will need to set chmod 700 to  be root executable. Then  save the script to your apache root folder.

There is a simple php script called testing.php

< ?php

$script = “/var/www/”;
$ver1 = system($script, $retval);
if ($retval == 0 ) {
echo “Returned 0″;
else {
echo “Returned not zero”;


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.


Page 4 of 41234