Food Strainer – Your Wifi reception booster!

I recently moved to a new house. Everything went well apart from my telephone & internet line migration. As for now, the telco/ISP (the Malaysian TMNet aka TMNut) cannot do the migration process due to technical problems. Been whacking their customer service almost everyday but they seem to have a trick of looping our reports and complains into some kind of black hole. They responded with varies of reasons such as no ports available, faulty line ect..etc.. but none of them seems to make any sense.

I desperately need internet connection at home and luckily a neighbor who are a broadband subscriber willing to share his internet connection with me via Wifi. He already have a wireless AP installed at his home for personal use.

So I plugged in my USB wifi adapter and manage to connect to his AP.

My USB wifi adapter

But the signal is very sluggish which is expected due to the distance between our house. The link quality barely archive 50% and I got frequent disconnection.

Wifi before food strainer

Fortunately a few months back I’ve stumbled upon some funny trick of using food strainer to boost wireless signal. So this is the most suitable time try it out.

I bought myself a new food strainer for RM11.00 and I cut a little hole just about the size of my USB wifi body.

My New Food Strainer

Put the device through the hole

Wifi inside food strainer

Wifi inside food strainer 2

And… PRESTO!!!

Wifi after food strainer

Neat (ugly) huh… But it surely works. My connection is now very stable.

My desktop show off ! (pardon my old hardwares. I’m a cheap geek..)

My powerful desktop

***I’m now thinking of permanently unsubscribe my TmNut telephone/internet line 😉

Simple port forwarding with Iptables in linux

One of the most common question I received from my customers is how to setup a simple port forwarding on top of their existing iptables firewall rules. Most of my customers are using Centos 5 and only uses the standard iptables provided by default upon operating system installation. For a more complicated setup I usually recommend existing iptables manipulation interface/packages (my favorite is Vuurmuur), but for those who just need one simple rule the the guide below should be enough to handle them.

Assumptions:

  • Only use IPV4
  • Two unit of machines involved, the linux machine that will act as the gateway/forwarder (IP: 192.168.0.1) and the destination machine (IP: 192.168.0.100)
  • The port to be forwarded is 5901 (Change to whatever port you want)
  • This guide is based on linux Centos 5, some other distros could also use the same setup but some other might need additional modification
  • Iptables service is turned on, and SELinux is turned off

Firstly, we have to make sure that the kernel allow port forwarding. Edit /etc/sysctl.conf and make the amendment below

net.ipv4.ip_forward = 1

To activate the rule above immediately without a reboot, run

sysctl -p /etc/sysctl.conf

Then run each of the commands below

To allow forwarding rule specifically to machine 192.168.0.100 in the FORWARD chain

iptables -I FORWARD -p tcp -d 192.168.0.100 --dport 5901 -j ACCEPT

The actual port forwarding rule

iptables -t nat -A PREROUTING -i lo -p tcp --dport 5901 -j DNAT --to-destination 192.168.0.100:5901

To masquerade the routed connection so that the firewall will treat it as local connection.

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

The port forwarding rules should be ready by now, you can test it by using some common tools like telnet.

To view the current rules, run

/etc/init.d/iptables status

Bear in mind that the iptables modification above will only effective on this boot session. It will be destroyed/reverted back to original setup after reboot. To make the rules permanent, make sure you backup your existing iptables template first. Simply copy /etc/sysconfig/iptables to another place or name.

After that, just run command

service iptables save

This will store your modified iptables rules into /etc/sysconfig/iptables thus making it persist even after reboot.

MAMPU pioneered OpenOffice adoption for Malaysian Government

Malaysian Administrative Modernisation And Management Planning Unit – MAMPU (http://www.mampu.gov.my) have recently making a bold move by introducing a policy to migrate to the OpenOffice.org open source productivity suite instead of the current widely used MS Office. The official adoption date will be on the 1st of April 2008 and the agency will also uninstall all copies of Microsoft Office by the end of 2008.

MAMPU Migrates to OpenOffice.org

Putrajaya, 19th March 2008 – The Malaysian Administrative Modernisation and Management Planning Unit (MAMPU), today officially adopts a policy to migrate to the OpenOffice.org open source productivity suite. This is in line with the Malaysian Public Sector Open Source Master Plan, which calls for government agencies to reduce costs, increase freedom of choice and interoperability.

From April 1st, MAMPU will start adopting the OpenDocument Format (ODF), standard for all new documents created. ODF the ISO open standard for electronic documents is also the default format for OpenOffice.org. The agency will also uninstall all copies of Microsoft Office by the end of 2008.

To ensure a smooth migration, presently over 80 agency staff have been trained by the Open Source Competency Centre (OSCC). Additional staff will then be trained internally by the IT department, which will also provide support for OpenOffice.org.

More info at
http://www.oscc.org.my/index.php?option=com_content&task=view&id=189&Itemid=128

Continue reading MAMPU pioneered OpenOffice adoption for Malaysian Government

MyFina – Web-based Personal Financial System

I’m releasing the source code and also live demo version of my application called MyFina.

MyFina is a simple web based personal finance and budgeting program for managing accounts and expenses. The system aimed at those who have little or no financial background to gain control over their money. The system supports multiple numbers of users. In making this software, the developer has attempted to make things as simple as possible, while still retaining enough functions to satisfy most home users.

More info at http://myfina.ridinglinux.org/

UPDATE
This project has been registered at Sourceforge
http://sourceforge.net/projects/myfina/

Krusader – the Winscp alternative in linux

This is the follow-up of my previous posting regarding “Winscp in linux (KDE & Gnome)“. I’ve recently used a tool called Krusader (http://krusader.sourceforge.net/). This is the application that I found to be the closest match to WinSCP since they both are twin-panel file manager A.K.A orthodox file manager. Krusader have most of the features (maybe more) WinSCP had such as SSH/SCP connectivity, folder comparison and synchronization. Furthermore some of the hotkeys are pretty much alike.

From the official website

Krusader is an advanced twin panel (commander style) file manager for KDE and other desktops in the *nix world, similar to Midnight or Total Commander. It provides all the file management features you could possibly want.

Some screen-shots of Krusader

Krusader
The application interface

Krusader folder synchronization
Folder compare and synchronization

MyGOSSCON 2007 – Malaysian Government Open Source Software Conference

MyGOSSCON 2007 with the theme “Accelerate Open Source Software Adoption” was held on 6-7th December 2007 at Putrajaya International Convention Center (PICC), Malaysia. This event was initiated by the Malaysian Open Source Competency Center (OSCC), MAMPU with association by the Federation of
Malaysian Manufactures (FMM).

Various government agencies, private organizations and independent personnels participate throughout the event. The event successfully attracts a huge number of crowd who are mostly government employees and also peoples who are interested in Open Source movement.

The event was officially launched by Tan Sri Mohd Sidek Hassan, Chief Secretary to the Malaysian Government. During the event, two new OSCC products were also officially launched

MyWorkSpace – Email Collaboration Suite
MyMeeting -Meeting Management System

More info at
http://mygosscon.ossc.org.my

I was involved with the event. It was really really tiresome but overall the event went smoothly. I’ve learned so many things throughout the event. Furthermore, I was one of the speakers during the event with my presentation titled “Virtualisation Facility For The Public Sector”.

Below are some photos taken during the event with courtesy of OSCC

OSCC Product Feature
Some of OSCC’s products featured during the event

Booth
One of the most attractive booth during the exhibition

MyGosscon 2007 Officiating Ceremony
The Officiating Ceremony

Me, During Presentation
Me, doing the presentation

OSCC Team
The backbone of the event

News coverage on TV3 😉

Creating internal/local Centos 5 repository with rsync

Below is the bash script I use to mirror Centos repository into our local server. Due to storage limitation, we have to be selective and only copies the packages/branches that we need. Currently we only mirror Centos 5 for “os and updates” base packages limited to i386 and x86_64 architecture only.

During the initial intensive downloading when the server is replicating for the first time, I run the script below in cron for every 30 minutes. The script will check whether the previous instance is still running or dead (sometimes we got disconnected). If dead then it will restart and continue the rsync process. Once everything is in place and all needed packages have been downloaded, I modify the cron job to do the job once in every 6 hours to make sure my server is up to date.

The script below is inspired by the script posted here by jlar310

#!/bin/sh
# created by Jalte @ http://www.ridinglinux.org

DATE=`/bin/date +%Y-%m-%d`
OUTFILE=/var/www/html/mirror/centos-mirror.log
RSYNC="/bin/nice /usr/bin/rsync --verbose --progress --delete-excluded --stats --archive --partial --timeout=600"
MIRROR=mirrors.kernel.org::centos
VER=5
ARCHLIST="i386 x86_64"
BASELIST="os updates"
LOCAL=/var/www/html/mirror/centos

date >> /var/log/rsynccentos.log

if [ -f "/var/run/rsynccentos.pid" ]; then
   RUNPID=`cat /var/run/rsynccentos.pid`
   if ps -p $RUNPID; then
      echo "Mirror is already running..."
      echo "Mirror is already running..." >> /var/log/rsynccentos.log
      exit 1
   else
      echo "Mirror pid found but process dead, cleaning up"
      rm -f /var/run/rsynccentos.pid
      echo "Mirror pid found but process dead, cleaning up" >> /var/log/rsynccentos.log

   fi
else
   echo "No process Detected"
   echo "No process Detected" >> /var/log/rsynccentos.log

fi

echo $$ > /var/run/rsynccentos.pid

echo -n "Rsync Started at "
echo "Rsync Started " >> /var/log/rsynccentos.log
date

for ARCH in $ARCHLIST
do
  for BASE in $BASELIST
    do
        DIR=$LOCAL/$VER/$BASE/$ARCH/
        if [ -d $DIR ]
        then
         echo "Directory exists."
        else
         echo "Directory does not exist, and will be created."
         mkdir -p $DIR
        fi
        REMOTE=$MIRROR/$VER/$BASE/$ARCH/
        $RSYNC $REMOTE $DIR > $OUTFILE 2>&1
    done
done

echo "`date`" > /var/www/html/mirror/centos-last-updated.log
chown -R apache:apache $LOCAL

Any comments are greatly appreciated

Installing Kolab Groupware Solution + Horde

My team has been assigned with the task to identify suitable email/collaboration suite to be proposed to our customers. We need some basic features such as email (with imap & pop support) calendaring, to do list and mail/groupware clients connection capabilities such as Kontact, Evolution and optionally MS Outlook.

For a start we decided to tryout Kolab Groupware Solution as some their features are suitable for our client’s environment such as using OpenPkg as the installation medium (our clients could use any type of distro), the usage of Postfix, OpenLDAP and Cyrus IMAP as the back end and last but not least the solution utilize Horde as their front end interface.

Below is the simplified installation guide for installing the solution. We are using a fresh installed Centos 5 machine with minimum package installation.

– Make sure SELinux is disabled (use setup)

– Install GCC for compilation process
yum install gcc

– Install GCC (compatibility 3.4) for to resolve gcc conflict
yum install compat-gcc-34

– Making GCC-34 as default gcc tool
mv /usr/bin/gcc /usr/bin/gcc41
ln -sf /usr/bin/gcc34 /usr/bin/gcc

– Create kolab template directory
mkdir /kolab-template
cd /kolab-template

– Download kolab sources
wget -r -l1 -nd --no-parent http://ftp.belnet.be/packages/kolab/server/release/kolab-server-2.1.0/sources/

– Verify file integrity (optional)
gpg --verify MD5SUMS
md5sum -c MD5SUMS

[Checkpoint #1]

– Create kolab production directory
cp -afv /kolab-template /kolab
cd /kolab

– Make sure that the following names are not in /etc/passwd or /etc/groups,
“kolab” “kolab-r” “kolab-n” if exist delete and run “pwconv”

– Start compilation.
sh obmtool kolab 2>&1 | tee kolab-build.log

*This process takes some time, so it is advisable to use ‘screen’ if your are connected remotely.

– If compilation failed, simply delete/rename the /kolab folder
and restart process at [Checkpoint #1]

– Start installation
/kolab/etc/kolab/kolab_bootstrap -b

– Start the services
/kolab/bin/openpkg rc all start

– Try access (using your web browser)
https://kolab_adress/admin

– Stop kolab services
/kolab/bin/openpkg rc all stop

– Download modified kolab sources (for horde support)
mv obmtool.conf obmtool.conf.bak
wget -r -l1 -nd --no-parent http://build.pardus.de/downloads/kolab-horde-tmp

– Some hacking to the obmtool.conf due to links provided already dead
– Change
URL="ftp://ftp.klaralvdalens-datakonsult.se/pub/kolab/server/current/2.1"
– to
URL="http://build.pardus.de/downloads/kolab-horde-tmp"

– Start re-compilation
sh obmtool kolab 2>&1 | tee kolab-build.log

– Start re-installation
/kolab/etc/kolab/kolab_bootstrap -b

– Re-start the kolab services
/kolab/bin/openpkg rc all start

– Try access (using your web browser)
http://kolab_address/horde

REFERENCES
http://wiki.kolab.org/index.php/Kolab2_Installation_-_Source
http://wiki.kolab.org/index.php/Fedora_6
http://wiki.kolab.org/index.php/Kolab2_Installation_-_Horde

Continue reading Installing Kolab Groupware Solution + Horde

AOL’s Active Virus Shield, the free version of Kaspersky Antivirus

Just to share with you guys,

For those who are looking for antivirus protection for your Windows machine,
you might have heard of Kaspersky Antivirus (KAV) which is arguably the best
and most effective antivirus in the market nowadays.

I’m glad to inform you guys (who did not know yet) that this Kaspersky
antivirus is available for free with the name “Active Virus Shield”. This is
kind of old news but I believe some of us still didn’t aware about this
thing.

http://www.activevirusshield.com
AOL’s Active Virus Shield

Even though the name is different, it is still KAV in the background and it
should be ways better compared to AVG and AVAST and even other commercial
antiviruses out there. (Yes, I hate norton & mc affee)

You will need to supply your email address in order to receive the activation
key. In the future you might receive a lot of marketing emails from AOL to
that particular email address as part of the agreement terms, so I advise
that you use your secondary email addresses such as yahoo or hotmail.

Additional readings
http://reviews.cnet.com
http://www.securitycadets.com

3D desktop with Beryl on Ubuntu Feisty

I’ve heard a lot of stories about 3D desktop features implemented and widely used in linux nowdays. Lots and lots of people had already install this cool feature and you can find a lots of videos on the net posted by users to show off their cool desktop.

Since I already had a Ubuntu Feisty Fawn 7.04 installed on my PC at home, I decided to tryout this feature and I chose Beryl for this time as it have more than just 3D desktop cube features available. There are more such as windows transparency, blur effect, scale effect and windows animation.

For a start, I launch Synaptic and make sure that the all repositories are available. I’m aware that my Graphic Card Driver (nVidia GeForce4 Ti 4200 AGP) will require proprietary driver so I enabled the ‘restricted’ repository in the Synaptic package management.

beryl1.png

Then I search for ‘beryl’. From the list, I selected ‘beryl-ubuntu’ package and mark it for installation.
Synaptic will automatically advised me to install a handfull of other packages that will be required for beryl to work. I marked them all. I also selected ‘beryl-manager’ and ’emerald-themes’ package for installation.

beryl2.png

beryl3.png

Then I clicked ‘apply’ to proceed with the installation.

beryl4.png

Synaptic will download and install those packages

beryl5.png

Once finished, I exited Synaptic. To enable 3D acceleration for my video card, I have to install a proprietary driver provided by NVidia. So I launch Ubuntu ‘Restricted Driver Manager’ (System > Administration > Restricted Driver Manager)

beryl6.png

Mark the ‘enabled’ checkbox to enable the driver. Confirm the installation when the system prompt for it. The system will automatically install the driver provided that I had already enabled ‘restricted’ repository in my synaptic/apt repository sources previously.

beryl7.png

beryl8.png

beryl9.png

The installation will require the pc to be restarted. Don’t restart the pc just yet. We need to do some extra process.

Open up terminal and run the command below


sudo cp /usr/share/applications/beryl-manager.desktop /etc/xdg/autostart/beryl-manager.desktop

This will make sure beryl will be launched automatically on each session.

Restart PC. Once the Ubuntu is restarted, a new diamond (emerald) icon will appear on the system tray

beryl10.png

Right click the icon if you want to customize your beryl setting. For this time I just use the default setting.

beryl11.png

So let’s play around. Open up a few windows.

For windows trasparency / blur effect:
Hold ALT key and scroll up/down your mouse

beryl12.png

3D Cubic desktops
Hold ALT+CTRL and hit Left or Right key
Hold ALT+CTRL+Left button of your mouse key and move your mouse

beryl13.png

Windows Scale Effect
Hit F8 or F9

beryl14.png

…Have fun!

Continue reading 3D desktop with Beryl on Ubuntu Feisty

The linux journey blog