Tuesday, August 31, 2010

Happy Independence Day :)

Hari Merdeka (Independence Day) is a national day of Malaysia commemorating the independence of the Federation of Malaya from British colonial rule, celebrated on August 31. In a wider context, it is to celebrate the formation of Malaysia.Today, the celebration of our Independence Day is fall in month of Ramadhan, which is on 21st of Ramadhan.

The effort for independence was spearheaded by Tunku Abdul Rahman Putra Al-Haj, the first Prime Minister of Malaysia, who led a delegation of ministers and political leaders of Malaya in negotiations with the British in London for Merdeka, or independence along with the first president of the Malayan Chinese Association (MCA) Tun Dato Sir Tan Cheng Lock and fifth President of Malaysian Indian Congress Tun V.T. Sambanthan. Once it became increasingly clear that the Communist threat posed during the Malayan Emergency was petering out, agreement was reached on February 8, 1956, for Malaya to gain independence from the British Empire. However, for a number of logistical and administrative reasons, it was decided that the official proclamation of independence would only be made the next year, on August 31, 1957, at Stadium Merdeka (Independence Stadium), in Kuala Lumpur.

The Federation of Malaysia, comprising the States of Malaya, North Borneo (later renamed Sabah), Sarawak and Singapore was to be officially declared on the date August 31, 1963, on the 6th anniversary of Malayan independence. However, it was postponed to September 16, 1963, mainly due to Indonesian and the Philippines' opposition to the formation of Malaysia. Nevertheless, North Borneo and Singapore declared sovereignty on August 31, 1963. Indonesian opposition later escalated to a military conflict. Indonesia considered Malaysia as a new form of colonization on the provinces of Sarawak and Sabah in the island of Borneo (bordering Kalimantan, Indonesia), which they laid claim on. To assure Indonesia that Malaysia was not a form of neo-colonialism, a referendum, organized by the United Nations, and the Cobbold Commission, led by Lord Cobbold, were formed to determine whether the people of Sabah and Sarawak wished to join Malaysia. Their eventual findings which indicated substantial support for Malaysia among the peoples of Sabah and Sarawak, cleared the way for the final proclamation of Malaysia.

The formation of the Federation of Malaysia was then announced on September 16, 1963 as Malaysia Day. The nationwide Independence Day celebration is still held on August 31, the original independence date of Malaya, while Malaysia Day is a public holiday only in East Malaysia. However, this has caused some minor discontent among East Malaysians in particular since it has been argued that celebrating the national day on August 31 is too Malaya-centric.[3][4][5] It is decided that starting 2010, Malaysia Day will be a nationwide public holiday in addition to Hari Merdeka on August 31.

Thursday, August 26, 2010

Iftar @ Wong Solo

Hi good day fellas and special thanks to my followers... :)

2 days ago my office mates, our KBK members and i gathered at Wong Solo for break-fast event. This restaurant is located at Bangi, just next to Amani Hotel Bangi. It's good to gather once again with them. Here is some shot. Tq to Nisak aka Budak kecik for the following images.

Wong Solo restaurant sells Indonesian food including the ayam penyet and so on & so forth...If you never try it yet, give it a shot then...but i must warn ya, Ayam Penyet is HOT!!!!!!!! :)

Monday, August 16, 2010

Installing Frash the easy way

It is frustrated when i heard iOS4 still do not allow the flash compatibility in the iPhone. Sad. Why do you need Flash on the iPhone? To see banner ads? No, not really.

You need Flash to see the whole Web: the one with icky-Flash intros that block you from accessing the main website, the Flash-based menu for a favorite local restaurant, the Flash videos that haven't yet been re-encoded for your iPhone, and so on. It may not be the Web you want to see, but it's the Web that, for now, you still need to see.

And now there's a way to get this content on your iPhone: Frash. Huhuuhuh.. big thanks to Comex.

To install Frash (aka flash for iphone) properly, you'll need to refer to a how-to guide, like this one hosted on Redmond Pie. But to sum up: You must first jailbreak your phone, download the .deb, upload it to a folder on your iPhone using SSH, restart your phone and... what's that? Did I lose you? Too freaky right?

There is another way, the easy way actually.You can just install Frash from Cydia, the jailbreak app store instead.

In order to accomplish this feat, you'll need to already have a jailbroken phone.

Then the instructions are as follows:

1. Launch Cydia and tap the "Manage" button
2. Tap "Sources"
3. Tap the "Edit" button (top-right)
4. Tap "Add" (top-left)
5. In the pop-up box, type http:///repo.benm.at/
6. Tap "Add Source" to close the box
7. Tap the "Done" button (top-right)
8. Go to the "Search" section in Cydia and search for "Frash"
9. Install the app.


Now you have Frash on your iPhone. SBSettings users can also add the "Frash Toggle" to easily switch Frash on or off. (You'll want to keep it off for the most part because it can hog the battery).

Friday, August 13, 2010

iPhone 4 wallpaper size

:) like to write all i know about tis thing. hahaaaa.. now i own myself this incredible device - iPhone 4 with iOS4.0.1 running on it. Ok let's move on and continue your reading. This litte entry about to create your own wallpaper for iPhone 4. Before that we need to know a little bit about iPhone screen resolutions and display.

The comparison iPhone 4 vs iPhone 3GS display:-

iPhone 4 official Display spec:

* Retina display
* 3.5-inch (diagonal) widescreen Multi-Touch display
* 960-by-640-pixel resolution at 326 ppi
* 800:1 contrast ratio (typical)
* Fingerprint-resistant oleophobic coating on front and back
* Support for display of multiple languages and characters simultaneously

iPhone 3GS official Display spec

* 3.5-inch (diagonal) widescreen Multi-Touch display
* 480-by-320-pixel resolution at 163 ppi
* Fingerprint-resistant oleophobic coating
* Support for display of multiple languages and characters simultaneously

Even though iPhone 4 have the same screen size as iPhone 3GS (3.5-inch diagonal), but both iPhone have a different pixel resolution. iPhone 3GS have 480x320 pixel resolution and iPhone 4 have 960x640 pixel resolution. Therefore, the best wallpaper size if you like to create your own wallpaper for your iPhone 4 is 640x960 pixel resolution (horizontal),960x640 (landscape) and 640x960 (portrait) wallpaper size. The iPhone 4 features a “Retina Screen”, which is Apple’s fancy name for a high resolution mobile display.

How to Make iPhone 4 Wallpaper

Making wallpaper for the iPhone 4 is very easy. Just like making wallpaper for any other device or computer screen, you just need to get the right dimensions and make an image of that exact size.

Now it's up to you to create your own wallpaper using your favourite photo/image editing software. I'm using photoshop and gimp. :)

Thursday, August 12, 2010

How to Format Nokia Phones (almost all N series and 60 series)

If you have turned on your Bluetooth on your Nokia mobile phone and forgot to turn off then chances are high that your phone may get infected with virus and the only solution to this is formatting your mobile phone. Re-formatting your Nokia phone is quite simple. This is how i've done it :-

Method 1: Three Finger Reset for Nokia Phone

1. Switch off your Nokia phone.

2. Hold down the following three keys, Green (call answer button) * Key, and Number ‘3? key.

3. While holding these buttons, press the power button and switch on the phone.

4. Wait for message ‘Formatting’ to appear on the screen and release all keys once you see that message.
Method 2: Hard Format of Nokia Mobile Phone

1. Switch off your Nokia phone

2. Now Press following key sequence *#7370#

3. Enter Default lock code is 12345.

4. While holding these buttons, press the power button and switch on the phone.

5. Wait for message ‘Formatting’ to appear on the screen and release all keys once you see that message.
Method 3: Soft Reset of Nokia Mobile Phone

1. Switch off your Nokia phone

2. Now Press following key sequence *#7780#

3. Enter Default lock code is 12345.

4. While holding these buttons, press the power button and switch on the phone.

5. Wait for message ‘Formatting’ to appear on the screen and release all keys once you see that message.

Please Note: The Above Nokia Phone Formatting method will erase all your Phone data. So do backup before proceeding for Formatting

Changing Joomla favicon

Favicon is the favorites icon that is associated with your site and appears in the left of your browser address bar. Both Joomla! 1.0.x and 1.5.x come with a default favicon that displays the Joomla! Logo. You may change that as long as your new favicon is in the ICO format and sized 16×16 pixels. Here’s how to do it:

Unlike the 1.0.x versions, the only name you are allowed to use for your favicon is favicon.ico but you are offered the flexibility to associate different favicons with different templates. You only need to upload your favicon.ico into the main folders of your front-end and back-end templates, which are found in the /templates/ and the /administrator/templates/ folders respectively, overwriting any favicon files that came with your templates.

However, if you’d rather use a global favicon for all your templates themes, just upload it into Joomla!’s main folder (that’s where your index.php resides) and into the /administrator/ folder. Make sure you delete all favicon.ico files found in the template folders mentioned above because Joomla! will check your template folder first for the favicon.ico file.

Please take note that to see the new favicon you will need to empty your browser cache.

How to retrieve joomla admin password

In this article, let’s see how you can retrieve admin password if you forget it. If you know the email address that was used for the admin user, and you have made the “lost password” feature available on the front end, the simplest thing is to do is to use the “lost password” Front-end function. There are times that when you develop your Joomla! application on localhost and the mail function is not properly set up, so you can’t use email to retrieve your password if you forget.

So for those who can’t use the email to retrieve, you will need access to the MySQL database. You got two options, either add a new super administrator or change the password stored in the data base. To do so you need to go to phpMyAdmin (or use a similar tool) and manually alter the database. Before doing this, back up your entire Joomla! database.

From phpMyAdmin, you can run the following SQL query to create a new user known as adminb.

(62, 'Administrator2', 'adminb', 'your-email@email.com', '21232f297a57a5a743894a0e4a801fc3',
'Super Administrator', 0, 1, 25, '2005-09-28 00:00:00', '2005-09-28 00:00:00', '', '');
INSERT INTO `jos_core_acl_aro` VALUES (10,'users','62',0,'Administrator2',0);
INSERT INTO `jos_core_acl_groups_aro_map` VALUES (25,'',10);

The password will be admin. Immediately log in and change this password and make any other changes to other admin users.

A second option would be to change the password in the table for your admin user. The password is stored in the MySQL database jos_users table password column. (Change this for your table prefix if different.)

Go to the table, find the row for your admin user, and then select that row for editing. The password must be hashed, you cannot simply enter text into this field.

Set the password to one of the known values shown below:

- password = "this is the MD5 hashed password"
- admin = 21232f297a57a5a743894a0e4a801fc3
- secret = 5ebe2294ecd0e0f08eab7690d2a6ee69
- OU812 = 7441de5382cf4fecbaa9a8c538e76783

Paste the hashed password into the field, save the change, and log in using the new password. Immediately change your password to something more secure!

How to setup Logwatch on Ubuntu Server

Logwatch is a modular log analyser that runs every night and mails you the results. It can also be run from command line.The output is by service and you can limit the output to one particular service. The subscripts which are responsible for the output, mostly convert the raw log lines in structured format.

Logwatch generally ignores the time component in the output, that means, you will know that the reported event was logged in the requested range of time, but you will have to go to the raw log files to get the exact details.

Install logwatch using the following command :-
# sudo apt-get install logwatch

Configuring Logwatch

First you need to make sure you server is able to send the mails outside you can do this using postfix with SMTP server configuration

Now you need to edit logwatch.conf file:-
# sudo nano /usr/share/logwatch/default.conf/logwatch.conf

Change the following information to suit your need:-

Output = mail
Format = html
MailTo = your_email@email.com

Save and exit the file.

Now edit the 00logwatch file:-
# sudo nano /etc/cron.daily/00logwatch

and add the following line :-
/usr/sbin/logwatch --mailto your_email@email.com

Save and exit the file.

This tool is very useful give it a try fellas!.

Note:-If you want to know more available options check logcheck manpage using the following command from your terminal.

# man logcheck

Tuesday, August 10, 2010

Selamat Meyambut Ramadhan Al-Mubarak.

This Wednesday(tomorrow), Muslim in Malaysia will start fasting. Ramadan is the ninth month of the Islamic calendar. It is the Islamic month of fasting, in which participating Muslims refrain from eating, drinking and sexual activities from dawn until sunset. I wish i could finish all the terawikh at night! :)

So Selamat Meyambut Ramadhan Al-Mubarak to all my friends and happy blogging!

Changing Your iPhone’s Default SSH Password

If you jailbreak your iPhone, the first thing you ABSOLUTELY MUST DO is change the default filesystem password.When you jailbreak, the filesystem’s password is set to the common password “alpine.” As people usually don’t bother changing this password after performing a jailbreak, it’s really easy for hackers to get access to any jailbroken iPhone/iPod Touch on a public network.

Changing the password is quick and easy. At your devices, you need to install "MobileTerminal".
Go to your cydia and search for it. Then install. Then follow this steps:-

Here’s how to change the default SSH password after jailbreaking:
1. Navigate to the newly installed ‘MobileTerminal’ application and tap to open.

2. In MobileTerminal, type ‘su root’ and tap return. It will ask you for a password, enter ‘alpine’ and tap return again.

3. Now, type ‘passwd’ and then tap return. Type in a new password such as ‘secret’ and tap return. Retype the new password to confirm and then tap return one last time to change the password.

4. Now, your SSH password will be changed and your device will be protected against any future hacks that use SSH to access your device.

note:- if you're not using mobileterminal, just ssh your device from your computer and ssh to it :-

root@rude-desktop:/home/dr_rude# ssh -l root
root@'s password:
dzuls-iPhone:~ root# ls
Library/ Media/
dzuls-iPhone:~ root# passwd
Changing password for root.
New password:
Retype new password:
dzuls-iPhone:~ root# ls
Library/ Media/
dzuls-iPhone:~ root#

:) pretty dead easy fellas!

Changing iPhone SMS Tones

Pretty boring to be limited to only a couple of sounds, right? Well to be honest, i kinda like the default sound, and they are for an SMS, not a call so… But some of you might want to change and personalize your SMS tones. Of course you can do that with ToneFXs , but thats not free, and pretty much all the crack methods out there, work and not really.Well, there always was a way to change the tones as long as you are on a jailbroken device because, yeah you guessed it, you will need to SSH.

First you will need to get some sounds. You can search for them with google or with your favorite P2P client and maybe you can find some torrents. The sounds must be in .aiff format. If they are not .aiff, dont worry just drop them into iTunes ( or any other converter ) and convert them to .aiff.

TIP: if you are on Mac, than you must know Adium. Just go to the Adium site and go to extras. You will find plenty of sounds there.

Once the sounds are ready SSH into your iPhone and go to: /System/Library/Audio/Uisounds.

for example : if your iPhone ip address is, from your computer (using ssh or terminal) issue the following command :-

ssh -l root
enter your iphone ssh password for root which is "alpine" by default.
you may change it for security reasons. i'll write another article for it later. :)
updated : here is the article about how to change default iphone ssh password.

There you will have all the default SMS tones. Here’s the tricky part: you must get rid of one of them. Let me explain: just copy the name of the text tone you don’t want and rename your new audio file that name (so if i have new_tone.aiff and sms-received2.caf rename new_tone.aiff to sms-received2.caf) then it will replace that text tone.So if you wanted to replace the chime text tone you would rename your new_tone.aiff to sms-received2.caf and so on for what ever you wanted to change. Enjoy! :)

Note : I'm tested this method using iPhone 2g 8gb (3.1.3) and iPhone 4 16gb (4.0.1). Should work with others iPhone family! :)

Sunday, August 8, 2010

How to make iPhone ringtones on Mac for free?

Read my break down below on how to make a custom iPhone ringtone, totally free, using JUST iTunes 9.2.1.

1. Find an MP3 (not AAC or anything with DRM [i.e. not bought, except Amazon])
2. Right click on the MP3 and choose ‘Get Info' and select ‘Options'
3. Set the start and stop time to your favorite part of the song. You'll want it to be no more than 20 seconds in length
4. Click ‘ok'
5. Right click on the song again, this time choose ‘Create AAC Version'
6. Drag the newly made AAC file from iTunes to your desktop
7. Delete the newly made AAC file from iTunes (it won't work if you have duplicates)
8. Change the name of the extension (the file on your desktop) from ‘m4a' to ‘m4r'
9. Now drag the file, with the new extension, back into your iTunes Library. It should appear in your ringtones section.
10.Sync your iphone. :)

If you want to make iPhone ringtones from DVD or videos, you need use software to extract audio from DVD or videos to MP3 first. iMedia Converter can help you to extract audio from DVD and videos to MP3. Then you can use iTunes to make iPhone Ringtones.

Friday, August 6, 2010

Bending the four elements

:) yesterday Yop aka Mat Blue, Usop Santorian, Shidi Botak and i went to GSC Alamanda. Watching "The Last Airbenders". The movies that usop and i wanted to watch. Not bad. Just dry and flat actually but it's not boring to watch. The story about the 4 basic elements in our life. Water. Earth. Fire. Air. Only the Avatar was the master of all four elements.Only he could stop the ruthless Fire Nation from conquering the world. But when the world needed him most, he disappeared. Then he back to rescue the tribes.

After the movies, what we've learned is that, we're capable to bend everything! :D

How To Turn Off Spell Check On Your iPhone 4

If you too are bugged by the Spell check feature (which is usually very helpful,except at times) on your iPhone or iPod Touch and want the spell check feature to be disabled so that you can type out all the words as you want them to appear, this article is a must read for you.

The process is pretty simple and straight forward, on your iPod Touch or iPhone head over to the Settings menu, then tap on General, next tap on the item called Keyboard. Once in the Keyboard item menu, all you need to do is turn off autocorrection. This will disable the spell check feature on your iPod Touch or iPhone device.

You can even set the Auto-Capitalization feature to ON or OFF from the same menu.

Iphone 4 : Activation, Jailbreak and Unlocked

Good day everyone. In order to use your iPhone, you have to activate it. While setting up the orignal iPhone and iPhone 3G required using iTunes, newer models are activated and mostly set up in the store. This is a step-by-step guide to everything you need to know about iPhone activation to get you started using it right away!

Activation :-

This method i tested using iphone 4. :) Turn on your iphone and attached it to your computer. Make sure your iTunes is the latest version, which is 9.2.1. I don't i highly recommend that to upgrade your iTunes first. After that get connected to your pc using USB cable that provided to you and follow the screen instructions. Enter your details there and you'll be asked about your iStore account too. iStore account is important for to access tones of apps in the Apple apps store.

Jailbreak :-

These are instructions on how to jailbreak any iPhone (including the iPhone 4) on iOS 4 using JailbreakMe by Comex. Before beginning make sure your device is activation on iOS 4.0.0 or 4.0.1. Ok for jailbreaking follow the steps below :-

1. Press to launch Safari from your Springboard. Make sure you get connected to the internet.
2. Press to select the address bar and input http://jailbreakme.com then press the Done button.
3. To begin the jailbreak simply move the slider to right. [slide to jailbreak]
4. You will be displayed a status bar as the download progresses.
5. Once the download is complete the jailbreak process will begin
6. Once you are notified that the jailbreak process is complete press the OK button.
7. Press the Home button to reveal Cydia on your desktop!
8. Congratulations you are done! You may now continue by installing UltraSn0w to unlock :)

Unlock :-

You still can't use your iPhone because your SIM is not officially iPhone carrier. In Malaysia, if you want to use iPhone 4, you need to wait for Maxis announced it arrival. Maxis is a official carrier for iPhone in Malaysia. So if you're using others service such as Celcom or DIGI, then you need to unlock it first. :) Here's how :-

Before you can follow these instructions you must have a jailbroken iPhone and you must be on the 04.26.08, 05.11.07, 05.12.01, 05.13.04, or 01.59 baseband(modem firmware).

1. Launch Cydia Installer from your SpringBoard.Make sure you get connected to the internet.
2. Press to select the Manage tab at the bottom of the screen.
3. Press to select the large Sources button
4. If the ultrasn0w repo is not present press the Edit button at the top right of the screen.
Otherwise, skip to step nine.
5. Press the Add button at the top left of the screen.
6. Enter http://repo666.ultrasn0w.com/ as the source url and press the Add Source button.
7. Once the source has been added press the large Return to Cydia button.
8. Press the Done button at the top right of the screen.
9. Press to select repo666.ultrasn0w.com from the list of user entered sources.
10.Press to select ultrasn0w from the list of packages
11.Press the Install button at the top right of the screen.
12.Press the Confirm button at the top right of the screen.
13.After installation completes successfully press the large Return to Cydia button.
14.Now press the Home button then power off and power on the iPhone.
15.You should now be able to insert the SIM of your choice! :D

A big thank you to all the members of the iPhone Dev-Team for all their hard work! It is much appreciated by all.

That's it fellas.

Tuesday, August 3, 2010

Install Awstats on Ubuntu 10.04

AWStats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages. It uses a partial information file to be able to process large log files, often and quickly. It can analyze log files from all major server tools like Apache log files (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar, IIS (W3C log format) and a lot of other web, proxy, wap, streaming servers, mail servers and some ftp servers.

This is how to install Awstats on Ubuntu 10.04 :-

Go to the terminal or ssh to your terminal. :- ssh -l dzul
note change to your server ip or domain, in my case is which is my testing server.

Then issue this command :-
sudo apt-get install awstats

If you to see the country of your visitors then :-
sudo apt-get install libnet-ip-perl
sudo apt-get install libgeo-ipfree-perl

Now we need to configure the Apache to works with awstats. Let's assume you want to analyze the Apache 2 log file of your website “yourdomain.com” (It can be just an IP address).

Create configuration file :-
sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.yourdomain.com.conf

and update these parameters :-

# apache2

# domain name
HostAliases="localhost yourdomain.com"



NOw we to run our awstats by issuing the following command :-
sudo /usr/lib/cgi-bin/awstats.pl -config=yourdomain.com -update

You should see the output something like this :-

Create/Update database for config "/etc/awstats/awstats.yourdomain.com.conf" by AWStats version 6.9(build 1.892)
From data in log file "/var/log/apache2/access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 191338
Found 0 dropped records,
Found 24 corrupted records,
Found 0 old records,
Found 191314 new qualified records.

After that we need to configure Apache to view the statistics. Create a file call statistics at /etc/apache2/conf.d/ directory.

cd /etc/apache2/conf.d/
nano -w statistics

and add the following parameters to that file.

Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /statistics/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch

restart your apache :-
sudo /etc/init.d/apache2 restart

if anything goes well, you're done.

To view your statistics, point to your browser like this :-

If you have more than one config file, then point to your browser like this :-

Lastly edit your crontab and add the following parameter:-
# update every 10 min
*/10 * * * * root /usr/lib/cgi-bin/awstats.pl -config=yourdomain.com -update > /dev/null

:) Viola. Give it a try!

Monday, August 2, 2010

Make your Ubuntu Lucid Lynx look pretty.... :)

How to make your Ubuntu look pretty? Nice themes or even look like MacOSX interfaces? This is how i done it.

Open terminal and and add the stable repository :-
sudo add-apt-repository ppa:bisigi/ppa
enter your password and wait for a while.

then update your apt-get :-
sudo apt-get update
enter your password

then :-
sudo apt-get install bisigi-themes
enter your password and wait till finish.

Now your can change your Ubuntu appearances by right click at your desktop - change desktop background and select your prefer themes there. You can also use system - preferences - appearance. :)

Sunday, August 1, 2010

MSL - Malaysian Super League

Yesterday, Gg, yop and I went to Shah Alam stadium watching Malaysian Super League game between Selangor and Terengganu. Honestly, it's been a long. long time since i never ever follow the progress and the story of our own league of football.

It's just fair performance from both teams at the first half, but it's enough for the fans of both teams to cheer it up. After the break, it's just a one way traffic. The host control the game very well.The game ended with victory to Selangor 2-0.

Why we rated our own league so poorly? Because we are the fans of EPL? Even 6 lads from UK watching that game. :) Hahahaa... Come on give them support and how long can we wait to see our two lions roaring again at the international level?

How To Install And Configure GreenSQL In Ubuntu 9.10

GreenSQL is an Open Source database firewall used to protect databases from SQL injection attacks. GreenSQL works as a proxy for SQL commands and has built in support for MySQL & PostgreSQL . The logic is based on evaluation of SQL commands using a risk scoring matrix as well as blocking known db administrative commands (DROP, CREATE, etc). GreenSQL is distributed under the GPL license.


1. Download its source code from its web.
2. Install the needed packages: apt-get install libevent-1.4-2 libpcre3 libmysqlclient15off libpq5 libmysqlclient15-dev libevent-dev libpcre3-dev libpcre3 libpq-dev flex g++ bison build-essential
3. Uncompress it: tar xvfz greensql-fw_*.tar.gz
4. Enter its directory: cd greensql-fw_*
5. Build the deb package: ./build.sh
6. Install the deb package (as root): cd .. && dpkg -i greensql-fw*.deb
7. Answer the questions to connect GreenSQL to your database

Configuration (using Apache):

1. Enter GreenSQL directory: cd /usr/share/greensql-fw
2. Set the right permissions to templates_c : chgrp -R www-data templates_c && chmod -R 770 templates_c
3. Create the file /etc/apache2/conf.d/greensql with the following content(replace [ and ] for angle brackets):

Alias /greensql /usr/share/greensql-fw
[Directory /greensql]
Order deny,allow
Deny from all
Allow from

4. Restart Apache: apache2ctl restart.
5. Access GreenSQL using your web browser (default user is admin and default password is pwd):

Change the default admin’s password.
Edit GreenSQL configuration to fit your needs.

NOTE : Change "localhost" to your domain name.

How to use:

To use GreenSQL, you have to change the configuration of the applications which connect to your database and point them to the computer where you have installed GreenSQL (localhost in this case) and the port where GreenSQL is running (3305 in my case to proxy my MySQL database). You can test whether it is working connecting to your database and creating a table (it should appear as an alert named “Detected attempt to create database/table/index” in GreenSQL and it should be blocked if you didn’t change the IPS option).

mysql -u root -h -P 3305 -p
CREATE TABLE greensql_test;

note : if you're running joomla, u need change your configuration setting to look like this :-

var $host = 'localhost'; to var $host = '';

Now we can go green with greensql. :)