Friday, January 27, 2012

Configure firewall on Ubuntu 10.04

Just learned a command line tool ufw for configure the firewall. It seems easy to use, but the server guide didn't teach how to setup rule on specific interface.

Lucky I found the solution, to configure ufw for specific interface, use the following syntax:

sudo ufw allow in on eth0
sudo ufw deny out on eth0
sudo ufw deny in on eth0 to any from any port 80 proto tcp

Reference: Link

Installing Ubuntu 10.04 server

I decide to setup my own LAMP environment to host my game portal. I decided to try Ubuntu, although I never have experence with it.

Fortunately, Ubuntu has large user base, it is very easy to find solutions.

After installed Ubuntu Server 10.04, I found only cli available. I prefer to have a GUI environment to get start. It is very easy to install Gnome desktop to a brand new Ubuntu server.

To add gnome desktop, simply run the following instructions.

sudo apt-get install gnome-core gdm indicator-applet-session
sudo apt-get install update-notifier
sudo apt-get install gtk2-engines
sudo apt-get install gnome-themes
sudo apt-get install gnome-network-admin

Because I run Ubuntu inside VirtualBox, I need to install the VirtualBox add-on for better performance.

Installing VirtualBox add-on require linux header and build-essential package:

sudo apt-get install build-essential linux-headers-`uname -r`
cd /media/VBOXADDITIONS_4.1.8_75467/
sudo ./VBoxLinuxAdditions.run

That's all. Next step is setup apache and mysql.