Skip to main content


Showing posts from 2008

How to connect to the internet using Celcom Broadband Modem

Luckily, I got my hand on my friend's Celcom Broadband USB HSDPA Modem. The model is E220. Fortunately on Mandriva, you don't need to type a command. It's all in the comfort of GUI.

below is the step-by-step process:

1. Open MCC (Mandriva Control Center) and then select Network & Internet (left frame) and then open Setup a new network interface.

2. Select GPRS/Edge/3G and click Next button.

3. The device should be shown and selected here. If not, you have to check whether Linux detected it using lsusb command. In many cases, this shouldn't be a problem for Linux detecting a USB device. Then click the Next button.

4. It will ask you for PIN number. One problem here. You have to enable PIN Protection for your card by going into MS Windows and use the software provided by TM to enable the PIN Protection. It is disabled by default. If it is disabled, you will get error after this even the PIN number is correct. After enable the PIN Protection, you can boot back into Linux a…

Queuegraph - a RRDtool frontend for Postfix queue-statistics

queuegraph is a very simple mail statistics RRDtool frontend for Postfix that produces daily, weekly, monthly and yearly graphs of Postfix's active, deferred, incoming and bounce queues.The postfix's queue is usually in /var/spool/postfix. queuegraph is created by Ralf Hildebrandt and based on mailgraph by David Schweikert. Below is the dirs in my system:

# ls /var/spool/postfix/
active/ corrupt/ deferred/ etc/ flush/ incoming/ maildrop/ postgrey/ public/ tmp/ var/
bounce/ defer/ dev/ extern/ hold/ lib64/ pid/ private/ saved/ trace/

In connection with qshape it can be used to find out if your server is having performance issues:
a large deferred queue indicates delivery problemsa large active queue points to slow destinations (e.g. a content_filter)You can download queuegraph here.

Before you download it, pls check the requirements:
rrdtools (Mandriva users: urpmi rrdtool)
librrds-perl (Mandriva users: urpmi perl-rrdtool)After finish download…

sdparm: a utility for SCSI device

You may have heard of hdparm - a utility for getting info and changing certain parameters for IDE-type hard disk. It can't be used for SCSI hard disk though. So is there any similar utility for scsi hard disk? Yes there's one utility called with almost the same name: sdparm.

You may think that it has the same or at least similar to hdparm. No it is not. Well let's see what we can do with it below.

How to install it?
Ubuntu/Debian: apt-get install sdparm
Mandriva: urpmi sdparm
Redhat: yum install sdparm

A few examples:
list common mode parameters of a disk
sdparm /dev/sda

Sample output:
/dev/sda: COMPAQ BF03697B5A HPB2
Read write error recovery mode page:
AWRE 1 [cha: y, def: 1, sav: 1]
ARRE 1 [cha: y, def: 1, sav: 1]
PER 1 [cha: y, def: 1, sav: 1]
Caching (SBC) mode page:
WCE 0 [cha: y, def: 1, sav: 0]
RCD 0 [cha: y, def: 0, sav: 0]
Control mode page:
SWP 0 [cha: y, def: 0, sav: 0]
Informational except…

NAT and ip forwarding

NAT (be it SNAT or DNAT) relies on ip forwarding. You enable it, they are effective. I forgot to think about it last time ( I think 3 months ago) I setup Linux as a router. This is because server distros, enable it by default. Some distros however do not and most of them distros targeted for desktop/home users (pls check all popular distros to confirm). To enable it, you have to run this 2 commands:

sysctl -w net.ipv4.ip_forward=1
sysctl -p /etc/sysctl.conf
Of course you have to root to run those.

The first command is to write 1 in /proc/sys/net/ipv4/ip_forward. It is equivalent to this command:

echo 1 > /proc/net/ipv4/ip_forward
The second command is to apply all changes in file /etc/sysctl.conf.

Whatever you set in sysctl.conf will be applied every system restart. So that's important if you want to enable it permanently as in the case of a router. First command doesn't do that. You have to edit sysctl.conf to make it permanent because it will be read every system restart. Edit t… 2008

What is
(excerpt from the website) 2008 is Malaysia’s premier Free and Open Source Software (FOSS) event. Whilst this is our first go at it, we aim for this to be an annual event bringing together professionals and enthusiasts from Malaysia, Singapore, Asia and the rest of the world for a two day grassroots driven FOSS conference. is different from other events in that we focus only on FOSS and that this conference is purely non-commercial. There will be no marketing/sales talks by vendors (we are very strict on this!) so all that is presented is FOSS goodness! Instead, vendors will be encouraged to speak on the FOSS technical aspects of their projects/tools. This approach works better as it benefits all through knowledge sharing within the community.

It will be held on 8 and 9 Nov 2008

Where? ( Map )
Lot 6, Technology Park Malaysia (TPM)
Bukit Jalil, 57000 Kuala Lumpur

What are the agenda?
Go here: for more info.


Mandriva Linux 2009 released

Mandriva has released its latest desktop edition which comes in 4 edition: One, Free, PowerPack and Mandriva Flash.

Mandriva One comes in CD and suitable for those who want to start using Mandriva Linux in no time. You can boot in to live CD and start working. It has the option to install to hard disk. This edition comes with proprietary softwares.

Mandriva Free is the free edition. It doesn't contain proprietary softwares. You can add those later though if you add the relevant repositories.

Mandriva Powerpack is a commercial pack containing proprietary packages such as flash plugin, nvidia, nvidia, ati, mp3 codec etc.

Mandriva Flash is a USB disk version of Mandriva. It now uses 8GB USB drive instead of 4GB in previous version. You have to order it from Mandriva Store.

More info on this release

I have been using Mandriva Linux for almost 7 years now and in my opinion it is one of the best distributions out there.

compiz-fusion: Cylinder anyone?

If you enable 3D desktop effects in your desktop, we can change the shape of the desktop when we 'spin' it to cylinder.
The steps are as follows:

1. Run ccsm - Compiz Config Settings Manager. In Mandriva, it's under Tools menu or you can type ccsm in terminal. Afterthat, click on Cube Reflection and Deformation.

2. Go to Deformation tab and click on Deformation menu to and choose Cylinder.

3. Test it by pressing Ctrl+Alt and press left button of your mouse and move your mouse to spin your desktop.

Here some screenshots of my desktop on Mandriva Cooker.

It takes two to tango

Yeah.. You may well confused with the title of this post. What the hell it has to do with Linux? Yeah. You got it wrong. Make people confuse is one of the tactic to make readers read your blog. Am i right? Well it doesn't matter.

Last week, I setup 2nd router for my office to make traffic smoother. We experienced slow internet connection lately and no wonder since we have 500 clients accessing the only one router to go to the internet. So after thinking a plan on how to solve it, I came out with a soultion to buy a new and powerful router. 3 days later, I was thinking it was a good idea to split the traffic since we have 2 internet connections. So I setup a second router and split up client connections to the two router evenly. After 2 days, I can say it is successfully make our internet experience a pleasure.

In the new router I installed squid 3.0, BIND and dansguardian. All on Mandriva Spring 2008. So every client connected to one of the router has been setup with gateway and dns…

Iptables: DNAT

DNAT stands for Destination NAT. It is a type of NAT. The other one is SNAT which stands for Source NAT. What's the difference I hear you ask. Good question! :) DNAT changes destination of relevant packets. SNAT changes the source of relevant packets. Last week, my boss asked me to open an internal system in order to be accessed publicly.
Let's say my internal system server's IP is and the system is a web-based system (port 80). It is behind a firewall which has a public IP say 111.222.333.444. To access the internal system from internet, the firewall IP should be used as a gateway to reach the internal system server.
Internet ----> Firewall ----> Internal system

I want to make any packets destined to port 3256 on firewall should be NAT'ed to internal system server on port 80. So the DNAT in firewall is:
iptables -t nat -I PREROUTING -s ! -p tcp --dport 3256 -j DNAT --to

There you go. All packets destined to firewall on p…

Linux : Before Munich, it was Extremadura

I remembered 3 years ago I read a Linux magazine about Munich. The government were going to convert all Windows PCs to Linux. Then I just came across an old news about how one of the poorest region in Spain migrated their all pcs using by civil servants duirng a weekend.

We changed the desktop systems from Windows to Linux during the weekend, when the civil servants came back next Monday morning they found Linux running on their desktop machines.

The public government of the Spanish region of Extremadura has now a long tradition of promoting and using free software. Extremadura is a region located in the South-West of Spain, in the center of a triangle formed by the cities of Madrid, Seville and Lisbon.

More from the news:

Another essential component of the network are the end user terminals. These were made from PCs running a localized version of Linux called Linex (compound word from LINux and EXtremadura) which they tailored to their specific needs and changing the name of the program…

Firefox download fiesta : Awesome record indeed!

Firefox download day was on June 17, 2008 (US timezone). The original target was 5 million downloads in 24 hours. Not only they reached the target but exceeding it by 3 millions. The best record ever for firefox downloads in a single day. The people of Guiness World Record has yet to validate the record. Please check back here again after a few days.

RankCountryPledges1United States3,915,3752Germany1,068,3153Japan714,8454United Kingdom488,0315Iran480,5506Spain440,8017France436,4478Lithuania370,7509Canada365,85210Italy364,634

Although the time to set the record has over, you are encouraged to download firefox 3 because it has over 15,000 improvements over previous versions. See release notes for more details.

(Excerpt from Mozilla page)
What’s New in Firefox 3:The Web is all about innovation, and Firefox 3 sets the pace with dozens of new features to deliver a faster, more secure and customizable Web browsing experience for all.User Experience. The enhancements to Firefox 3 provide the be…

openSUSE and iMac G3

If you have an iMac G3 and want to install Linux (instead of throwing it out of your window and kills 2 people :P), you may want to try openSUSE. From my experience, openSuse is the best distro for it. What about other distro? Well, i've tried Ubuntu. It is not suitable for this type of iMac. YDL? The installation went smoothly but i had to tweak the X before it worked. One caveat though. If your iMac doesn't have DVD drive, you have to install via internet. First you have to download the install iso and burn it to CD. Boot from the CD and there's menu for you to choose. Choose installation and update. For more info on this, click here.

You will be asked for repository IP address. You can put name address instead of IP. Then, you will asked for directory for packages. Enter the directory. You can find them here. Please choose a repository near you.

Any question regarding installation, just ask here. Maybe I can help. :)

upgrading zlib

I have to upgrade my zlib to version 1.2.3 to upgrade clamav 0.93. If you have recent version (after July 18,2005), you might have it installed already. For older distros, upgrade is a must to avoid security vulnerabilities in 1.2.1 and 1.2.2. You can download the source code here :

Install from source.
1. unpack the source : tar xzvf zlib-1.2.3.tar.gz
2. change to source dir: cd zlib-1.2.3
3. configure it: ./configure --shared --prefix=/usr
4. 'make' it: make
5. install it: make install (this will install the library in dir /usr)

Extra check:
1. Go to /usr/lib and check whether symbolic links are ok :
[root@proxy lib]# ls -l libz*
lrwxrwxrwx 1 root root 13 May 16 06:29 ->*
lrwxrwxrwx 1 root root 13 May 16 06:29 ->*
-rwxr-xr-x 1 root root 82305 May 16 06:29*

If old libraries are still lying around or and point to old library e.g ->, del…

Installing CentOS 5.1

Hi all,
I am installing CentOS 5.1 to a machine at my friend's office. I had to download 7 ISOs beforehand but it needs only 5 CDs for complete installation (depending on what packages I want to install). I might have downloaded the DVD iso but since I don't have DVD-RW drive, I chose to download the CD ISOs.
The machine is HP Proliant 350 G5 with Intel Xeon processor and it is a 64-bit machine (as all modern Xeon processors are). The machine has been installed Fedora Core 5 before and it had many problems as FC5 is designed for desktop and not server. This should be expected. The machine will be used for database, dhcp and DNS server.

Compiz-Fusion on Mandriva Spring 2008

Upgrading Mandriva 2008 to Mandriva 2008.1 aka Mandriva Spring

Screenshot of KDE 4 on Mandriva Spring 2008

Here are the steps to upgrade mandriva 2008 to 2008.1 via online repos.

1) Back up the current urpmi.cfg
2) Change the repos mentioned in urpmi.cfg from 2008.0 to 2008.1
3) Run urpmi.update -a to verify repos
4) urpmi --auto-update -v

If there are problems with dependencies, remove the old versions (notably KDE4 as in my experience, yours maybe with different packages). Then in some cases you have to run this command:

5) urpmi --auto-select

Relax and sit back while watching the packages being upgraded. For my system, almost 1600 packages upgraded. Lastly, you will be instructed to reboot the system because of kernel and dbus upgrade. So far the new system is running smoothly without problem.

reference: Mandriva Forum

My history of commands

Based on kagesenshi's post titled Me! Me!, I also want to know what commands were used by me regularly. So:

[zamri@localhost ~]$ history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
126 ssh
100 ls
97 smbclient
86 cd
76 su
58 wine
48 ping
35 joe
32 exit
17 ps

There you go. The ouput isn't surprising. I did lots of ssh to my servers and wine (ahaaa!! surprise!), I played windows games a lot for the last 4 months. Now I stop playing 'em completely. It is boring when you always win. :P

clamav 0.93 released

I just feel like it was yesterday I upgraded my clamav to 0.92.1. Now it is version 0.93. I gotta upgrade it ASAP. Thanks to the spirit of OSS. The excitement will never end. :)

Changes since 0.92.1:
* libclamav:
- New logic in scan limits: provides much more efficient protection against
DoS attacks but also results in different command line and config options
to clamscan and clamd (see below)
- New/improved modules: unzip, SIS, cabinet, CHM, SZDD, text normalisator,
entity converter
- Improved filetype detection; filetype definitions can be remotely updated
- Support for .cld containers (which replace .inc directories)
- Improved pattern matcher and signature formats
- More efficient scanning of HTML files
- Many other improvements

* clamd:
- NEW CONFIG FILE OPTIONS: MaxScanSize, MaxFileSize, MaxRecursion, MaxFiles
ArchiveMaxFileSize, ArchiveMaxRecursion, ArchiveMaxFiles,

Yakuake - An easy access console

Yakuake (Yet Another Kuake KDE terminal emulator) is a KDE console application that I use the most for months now. Before, I used to use konsole but after installing yakuake, I rarely use konsole anymore. The most important feature is the quick easy access to it by pressing a key. The key is configurable. I can't remember what is the default key for it but I choose F8 because the default is used by another application.

Installing yakuake
Debian - use synaptic or aptitude or apt-get install yakuake
Mandriva - use graphical rpmdrake or urpmi yakuake
other distros - please consult your distro documentation.

I have read a Linux mag (don't know which) that it is favorite among KDE developers and will be replacing konsole. I don't know whether this is true. Anyone can confirm this?

Yakuake home page (new update)
Yakuake - An easy access konsole for KDE
More info :

dbmail 2.2.10 released

I have just upgraded my dbmail to 2.2.10. There are bugs fixed. So upgrade is highly recommended.

Changes since 2.2.9:

- - PostgreSQL 8.3 compatibility (# 676).
- - Duplicate key errors and other insertion problems ( #685, #686).


Debian etch backport:
deb stable main

Full changelog:;a=shortlog;h=v2.2.10

Refer my previous post on how to upgrade dbmail (without database schema change).

Transparent proxy with squid 2.6

I have upgraded my squid from 2.5 STABLE13 to 2.6 STABLE18. Transparent proxy is setup differently in this version. You need this directives in squid.conf (usually in /etc or /usr/local/etc or /usr/local/squid/etc, check with your distro).

acl our_networks src
http_access allow our_networks
http_port transparent
always_direct allow all

where is your proxy server IP address.

If you have flushed your iptables, create new rule:

iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j REDIRECT –to-port 3128

where 3128 is the port where squid is running.

Squid - File size limit exceeded

Yesterday (15th Feb 2008) my squid died unexpectedly. I tried to restart it several times but to no avail. So I tried to see what went wrong by debugging and ran it in foreground. So,

squid -NCd3

N = put it in foreground
C = don't catch fatal signals
d = set debug level (3 is the level)

It threw a bunch of messages with the last line was File size limit exceeded. Just like this but I got no core dumped!. With no clue how to solve it, I recompiled squid (2.6-stable17) with extra parameters (with-max-fd=8192 and --with-large-files):

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-icmp --enable-kill-parent-hack --enable-ssl --enable-linux-netfilter --enable-large-cache-files --enable-follow-x-forwarded-for --with-large-files

It solved it. Shane reported here that this happens when file store.log is bigger that 2 GB. Disabling the use of store.log (or other relevant files for that matter) will get rid of this problem.

dbmail 2.2.9 released

From dbmail mailing-list (Feb, 9 2008):

Hi all,

I'm pleased to announce the availability of DBMail version 2.2.9, the latest in the stable/production series.

THis is a bugfix maintenance release.

Bugs fixed since 2.2.8:

DBMail - 2.2.9
- 0000668: [Command-Line programs (dbmail-users, dbmail-util)]
dbmail-export segmentation fault and mbox compatibility (paul)
- 0000663: [Authentication layer] Authldap module reloads when it try to recconect
- 0000662: [Authentication layer] Ability to bypass authentication on Active Directory
- 0000660: [IMAP daemon] imapd provides better inetd compatability (paul)



kind regards,
Paul Stevens paul at

What is dbmail?
Read here

up-imapproxy-1.2.6 released

From imapproxy-info mailing list:


I'm pleased to announce that up-imapproxy-1.2.6 has been released and is
available for download from

Updates since 1.2.5 include:

* General daemon enhancement (closing extra file descriptors at startup,
pidfile support)

* OpenSSL is now threadsafe.

* ipv6 support added.

* In general, this code should be in sync with the debian distribution now.

Many thanks to José Luis Tallón, Jan Grant, Matt Selsky and Antonio Querubin
for their contributions to this release. As always, thanks to Ray Link for
hosting the site. If I had to pay for hosting, there probably
wouldn't be an site.

Please send any bug reports, requests, questions, comments, praise, hate,
etc to this mailing list.


DaveMore info: imapproxy

KDE 4.0 released (at last!)

The much-awaited KDE 4.0 has been released on Friday 11 Jan 2007.

From the announcement page:
The KDE Community is thrilled to announce the immediate availability of KDE 4.0. This significant release marks both the end of the long and intensive development cycle leading up to KDE 4.0 and the beginning of the KDE 4 era.

The KDE 4 Libraries have seen major improvements in almost all areas. The Phonon multimedia framework provides platform independent multimedia support to all KDE applications, the Solid hardware integration framework makes interacting with (removable) devices easier and provides tools for better power management. The KDE 4 Desktop has gained some major new capabilities. The Plasma desktop shell offers a new desktop interface, including panel, menu and widgets on the desktop as well as a dashboard function. KWin, the KDE Window manager, now supports advanced graphical effects to ease interaction with your windows. Lots of KDE Applications have seen improvements as well…

Testing compiz-fusion on debian

My system:
debian lenny

apt-get install compiz-fusion-kde
apt-get install compiz-fusion-gnome

Optional packages:
apt-get install compiz-fusion-plugins-unsupported
apt-get install compiz-fusion-plugins-extra
apt-get install compiz-fusion-icon

Above commands install kde and gnome-specific compiz-fusion backends and all other packages will be automatically installed depending on dependencies. To start compiz-fusion for KDE, go to System -> Compiz Fusion Icon.

Put this in /etc/apt/sources.list
deb ./

Some screenshots:

Upgrading gcc to upgrade clamav to 0.92

I have problem upgrading my clamav 0.91.2 to 0.92 due to bug in gcc 4.0.1 on my Mandriva 2006. So I upgraded my gcc to 4.1.2. I chose to compile from source. It is advisable to refer to successful builds pertaining to the version of gcc to get a clue whether it will successfully build on your target system. I didn't choose later version because I couldn't find any successful build for my system. So I played safe. :P

Download: GNUgcc 4.1.2 (China Mirror)
You have to download at least gcc-core-4.1.2.tar.bz2 and gcc-4.1.2.tar.bz2. I also downloaded gcc-g++-4.1.2.tar.bz2, andgcc-objc-4.1.2.tar.bz2. I didn't download the others because I didn't need them. You may want to download them depends on your requirement.

Untar the tarballs
tar xjvf gcc-core-4.1.2.tar.bz2
tar xjvf gcc-4.1.2.tar.bz2
tar xjvf gcc-g++-4.1.2.tar.bz2
tar xjvf gcc-objc-4.1.2.tar.bz2

The above commands will untar the tarballs into a dir that is gcc-4.1.2. Then, as usual, run ./configure, make and make install. Be…