Wednesday, November 30, 2005

Firefox 1.5 released


Firefox 1.5 has been released after the 1-year wait from the last major software update, Firefox 1.0. It sports a new rendering engine (Gecko 1.8) as well as hundreds of other software improvements. Important changes include faster page loading, the ability to reorder tabs, faster back and forward buttons, a feature to clear personal data, improved accessibility and popup blocking, and SVG, CSS 2 and CSS 3, and JavaScript 1.6 support. You can download it here.

Firefox has attracted attention as an alternative to other browsers such as Microsoft Internet Explorer. As of September 2005, estimates suggest that Firefox's usage share is around 7.6% of overall browser usage (see market adoption section). Since its release, Firefox has slightly reduced Internet Explorer's dominant usage share.

Monday, November 28, 2005

It's raining cats and dogs

It's monsoon season here in East Coast of Peninsular Malaysia. When I'm thinking of rain, I'm thinking of an idiom it's raining cats and dogs to describe heavy rain. What I'm thinking was (at that time) , a group of cats and dogs, quarelling while they were falling off the roof. Funny isn't it? Well idioms are full of funny (and crazy?) synonyms but not all of them. I heard one of them since my secondary school years, hustle bustle. Then, my teacher said "It's too english for you!". All of us didn't get the correct answer for that particular fill in the blank question. Oh well. Now as a worker talking and writing in English for most part of my work, I still rarely use lots of them.

Wednesday, November 16, 2005

I can't take my eyes off you (relax a bit)



Nor yet were you seen
neither seen nor heard
when this earth was made
when the sky was built...

- Kalevala 3:245-248

He looked up as he plodded
Down 42nd Street,
So many nameless faces
All shuffling to some beat.

So many anonymities,
But then, to his surprise,
He suddenly made contact
With a pair of hazel eyes.

She looked into his soul's windows
And didn't look away.
A wry smile grew inside his mind;
"All right," he thought, "I'll play."

He gazed back at her placidly,
His cold blue eyes grew warm.
And only then did he glance down
To admire her female form.

As she passed him by that day,
He hazarded a grin.
She kept her lovely eyes on his
But still,
to his chagrin,
The woman walked away from him,
Without reciprocating.

He chuckled silently,
knowing
That other eyes were waiting.


-- courtesy : AndersenSilva.com

Wednesday, October 12, 2005

Linux Advanced Routing And Traffic Control (LARTC)

Introduction

Networking in Linux is one of essential part for the success of this operating system. The flexibility and robustness are the key point for the success. However, the user-friendliness, at the very early stage, was not good which resembles the old Unix. Nowadays, many modern Linux distros come with good interface on setting up many aspects of networking stuff and many things can be configured automatically when the hardwares detected.

Many organizations need to have an advanced routing for their network infrastructure. Basic network infra cannot cope with certain conditions. This is when the advanced routing comes into play. In Linux, we have iproute2 package to work hand-in-hand with iptables and recent kernel for advanced routing. This topic is thoroughly covered on LARTC home page at http://www.lartc.org. My article here just covers basic things.

Make it work

Let's take a look at this scenario :

Scenario 1

We want to route packets that come from local network(s) to two different or two same ISPs. Say the two ISPs are tm1 and tm2 with the associated IP respectively (see above diagram --deleted. Will update soon! - 16/11/2005).

Our work is in the router box. Login as root and set two tables:

echo 1 tm1 >> /etc/iproute2/rt_tables echo 2 tm2 >> /etc/iproute2/rt_tables

These commands will put 2 new table entries in file rt_tables. The content of the file after previous commands :

255 local
254 main
253 default
0 unspec
1 tm1
2 tm2

Now we have 3 routing tables :
main
tm1
tm2

The next step is to populate the routing rules to the tables:

tm1 table

~# ip route add default via 10.1.1.1 dev eth1 table tm1
~#ip rule add from 192.168.0.0/24 table tm1

**Explaination
The packets that come from 192.168.0.0/24 will go to tm1 routing table and then will be passed to the tm1 gateway (default route) which is 10.1.1.1 on device eth1

tm2 table

~#ip route add default via 10.8.8.1 dev eth2 table tm2
~#ip rule add from 192.168.1.0/24 table tm2

**Explaination
The packets that come from 192.168.1.0/24 will go to tm2 routing table and then will be passed to the tm2 gateway (default route) which is 10.8.8.1 on device eth2

To see the routing tables after previous commands :

To see tm1 table:

~#ip route show table tm1

To see tm2 table:

~#ip route show table tm2

To see main table:

~#ip route show table main

Please note that this kind of routing can't be done without iproute2 package.Please make sure that this package is installed first with your distro utility.On Mandrake, this can be done with urmpi as simple as urpmi -v iproute2.


let say that you want to route packets based on their destination ports. You can do this with the help of iptables. To mark the packets that have the 22 and 80 as destination port, we will use the mangle table as below :

~#iptables -t mangle -A PREROUTING -i eth0 -p tcp --dport 80 -j MARK --set-mark 1
~#iptables -t mangle -A PREROUTING -i eth0 -p tcp --dport 22 -j MARK --set-mark 2

Let say you want to separate their route based on the destination port:

All packets with destination port 80 will go out via table tm1

~#ip route add default via 10.1.1.1 dev eth1 table tm1
~#ip rule add from all fwmark 1 table tm1


All packets with destination port 22 will go out via table tm2

~#ip route add default via 10.8.8.1 dev eth2 table tm2
~#ip rule add from all fwmark 2 table tm2

All packets with destination port 22 will go out via table tm2

Happy experimenting!

Saturday, September 17, 2005

How to make your mailserver faster ?


My mailserver was very slow when more than 10 users accessing it simultaneously. It uses squirrelmail as the front-end for webmail. As you know (or maybe don't know :P), squirrelmail is built using php and an administrator can extend its functionality via plugins. There's many good plugins to ease administrator's chore and also for users. php on a good side is a very powerful language but it is suffer when it has to open and execute many files. It has to recompile everytime the file is to be executed. This results in slower response because it has to do the same thing over and over again. But thank god I just found the solution. The solution is simple. Everytime the php file is compiled, the resulting binary is used whenever the file is fetched. This results in faster execution time and faster response. The term for this solution is php accelerator. There's many php accelerator out there but the one that gives large boost performance is eaccelerator formerly know as Turck MMCache. It is claimed as the fastest php accelerator out there. For time being I have installed Turck MMCache (the old version of eaccelerator) for I haven't found any Mandrake package of eaccelerator yet. This is what I installed on my mailserver box to make it faster.

1. php accelerator (Turck MMCache)
To speed up php execution.

2. caching-nameserver (BIND 9)
To speed up dns resolution.

3. imapproxy (http://www.imapproxy.org) -- updated : Sept 20,2005
To speed up connection to imap server by caching it.

4. chmod 1777 /var/spool/mail -- updated : Oct 18,2005
Speed up Squirrelmail access to mail and for some distro like Mandrake 10.x, it can prevent crash. (only for those who use mbox-style mail format)

Clever huh? If you know the theory of the details on how networked boxen connect and talk with each other, you also should know how to make it faster.

Cheers!

Monday, August 29, 2005

Merdeka day celebration

Cherating -- 2 days before National Day.

31st August every year, Malaysian celebrates "Merdeka Day" or National Day. On National Day eve, I was still at my office doing my work. repairing..downloading.. configuring..installing and testing. What a day for me. Never knew to rest at home or joining my friends celebrating the Merdeka Day. Not that I hadn't had a clue or had experience to celebrate it but I just didn't give a damn. Why? because I prefered to celebrate it in cyber world. Wired and sometimes wireless.

I had experienced it before. During my study years at Penang. Those days were unforgettable. We gathered at a field near Padang Kota Lama and waiting for the countdown. 10..9..8....3..2..1 and firework started. What did we get from a celebration like this? Is this the best way to celebrate? Many people complaining about the raising of oil price and many suffers from it. How can we waste money for the firework? Whose money is that? Can you tell me?

Thursday, August 18, 2005

Ethernet bonding revisited


Ethernet bonding

2 days ago I was able to do ethernet bonding for my Linux box which acts as a proxy server and firewall. What I did was to bond two private network interfaces to act as one. What I need to do was installing 2 NICs and setting the driver (autodetect on modern distros). Then I need to create the bonding interface like this :

~#modprobe bonding mode=0 miimon=100

~#ifconfig bond0 192.168.0.2 netmask 255.255.255.0 up

~#ifenslave bond0 eth0

~#ifenslave bond0 eth1

Note:

bond0 is the "bond" interface. eth0 and eth1 are the interfaces to be bonded so called slave devices (or interfaces).They are connected to my private network (LAN). The bond interface will have MAC address of the first slave device to be its MAC address. Please take note that the mode=0 means that we want load-balancing capability. You can use this bond interface in iptables command or tcpdump. In my network environment, I use this command to the bond0 interface:

~#iptables -t nat -A PREROUTING -s 192.168.0.0/24 -d 0/0 -i bond0 -p tcp --dport 80 -j REDIRECT --to-port 3128

where squid is running on port 3128. If not, change it accordingly. For tcpdump :

~#tcpdump -i bond0

I wish you all good luck and happy bonding! :-)

Nvidia new hotplug feature on Linux

 If you use nvidia driver for your GPU, you probably wonder why in some config, you can't hotplug your second monitor. You need to reboo...