Air Crash Investigation

I’m not sure why, but I love watching Air Crash Investigation on the National Geographic Channel. Maybe I’m fascinated with how passenger airliners can be both awesome and fragile at the same time. They’re huge, majestic, and chock-full of gizmos and gadgets and instrumentation; and yet, a small glitch or mistake can cause them to simply fall from the sky and leave absolutely no survivors.

Here are those that I’ve seen:

1. Aloha Airlines Flight 243 – “Hanging by a Thread” – Metal fatigue causes part of the roof to be ripped off. A stewardess is sucked out of the plane. A survivor reports having seen cracks on the fuselage when boarding the 737.

2. Flash Airlines Flight 604 – “Vertigo” – Night-time flight; the aircraft rolls into the sea a few minutes after take-off. Investigators attribute it to pilot error (spatial disorientation) but Egyptian authorities disagree, citing mechanical failure.

3. Helios Airways Flight 522 – “Ghost Plane” – This one is rather eerie. The pressure setting is configured incorrectly causing everyone on board to lose consciousness, including the flight crew. Cabin recordings show that the pilot and co-pilot were trying to diagnose the problem but were unable to think straight due to lack of oxygen. After radio contact was lost, fighter jets were scrambled to intercept the Boeing 737. In the last moments, the fighter pilot witnessed someone entering the flight cabin and trying to regain control of the aircraft. Minutes after that, the plane crashed into a mountain, killing all 121 on board. It was later surmised that the mystery person was a flight attendant who was wearing a portable oxygen mask.

4. Turkish Airlines Flight 981 – “Behind Closed Doors” – Faulty design leads to a cargo door blowing out in mid-flight. The resulting explosive decompression damages the DC-10’s hydraulic system, causing all control to be lost.  This is a tragic case of negligence as the airplane manufacturer was in fact aware of the design flaw but did not make the necessary improvements.

5. Air Canada Flight 143 – “Gimli Glider” – This is my favourite (if ever is there such a thing as a favourite disaster; anyway, in this case, there were only a small number of minor injuries). Air Canada had only just converted from imperial to metric. Not only did both ground crew and flight crew miscalculate the amount of fuel required, the fuel gauges were out of order: the plane runs out of fuel mid-air. Fortunately the pilot is also a glider pilot and knows how to fly a plane without engine power. Approaching the runway too fast, he executes a forward slip, a manoeuvre used only on small planes, the first (and perhaps the only) time being performed on a 767. The CG reconstruction helps us fully appreciate this feat – the airplane is shown flying sideways, and only correcting just before touchdown. After this incident, the scenario was programmed into a flight simulator; nobody has ever managed to pass the test. Therefore passengers of Flight 143 were fortunate that the only pilot who could have saved them was actually flying the plane at the time.

Local Trivia

Has a Malaysia Airlines plane ever crashed? Yes, in fact: flight MH653 on 4 December 1977. A Boeing 737 was hijacked under “mysterious circumstances” and plunged almost vertically into a swamp in Tanjung Kupang, Johor, instantly killing all 100 on board.

Guest-Host Connection in Vmware through Firestarter

Following my previous post on VPNC, after modifying the user-pre file in Firestarter, it somehow screws-up my guest-host connections in Vmware. The host, running on Ubuntu 8.04, no longer be able to connect to it guests, and vice-versa. The following is what I did to make the connection works. I had to post this up for future reference, just in case I forgot.

1. Edit /etc/firestarter/user-pre . First, make the file writable:
sudo chmod 600 /etc/firestarter/user-pre

2. Edit the file:
sudo gedit /etc/firestarter/user-pre

3. Copy the following to the file:
$IPT -A INPUT -i vmnet+ -j ACCEPT
$IPT -A OUTPUT -o vmnet+ -j ACCEPT

4. Save the file and close.
5. Change the user-pre file permission back to the way it was:
sudo chmod 440 /etc/firestarter/user-pre

6. Restart Firestarter:
sudo /etc/init.d/firestarter restart

Now the connection is restored. Both the guest and host can share files, access the web servers, etc.

VPN Connection in Ubuntu using VPNC

I’ve been using VPNC in my Ubuntu to access my company’s VPN from https://getmoreprivacy.com/ for quite some time now. The story is, I’ve tried using Cisco VPN, but it will only get me as far as connecting to the VPN server. When I’m trying to access the company’s intranet, I’ll get a “page not found” error slapped to my face. I’ve found out it has to do with my machine’s Firestarter. I doesn’t really feel comfortable removing or stopping my Firestarter, so I have to find out ways to access VPN, and still having my Firestarter active.

After doing some googling, I stumbled upon VPNC, alternate VPN client for Cisco servers.

Installing VPNC:
1. Enter the following in the terminal to install VPNC on your computer:
sudo apt-get install vpnc resolvconf

2. Create a <filename>.conf file in /etc/vpnc/ . Enter following command to create myoffice.conf:
sudo gedit /etc/vpnc/myoffice.conf

3. Copy the following text to that myoffice.conf file:
IPSec gateway <server IP address>
IPSec ID <group name>
IPSec secret <group password>
Xauth username <username>

You can get the values for <server IP address>, <group name> and <group password> by opening your Cisco VPN client .pcf file. For <group password>, the value is encrypted. What you have to do is, copy all the characters from the “enc_GroupPwd” value, go to this cisco vpnclient password decoder site, paste the characters and click “Decode”. It will give you the decrypted group password. Now, copy the decrypted password and replace it with the <group password> in your myoffice.conf. Replace your user name to <username>. Save the file and close.

Running VPNC:
You can run VPNC simply by running this command:
sudo vpnc myoffice /etc/vpnc/myoffice.conf

Enter your VPN password once connected. To disconnect:
sudo vpnc-disconnect

Making it work with Firestarter:
You might have a problem accessing for company’s intranet if you have Firestarter installed. Instructions below will make it work.

1. Edit /etc/firestarter/user-pre . First, make the file writable:
sudo chmod 600 /etc/firestarter/user-pre

2. Edit the file:
sudo gedit /etc/firestarter/user-pre

3. Copy the following to the file:
iptables -A INPUT -j ACCEPT -s xxx.xxx.xx.xxx -p esp
iptables -A INPUT -j ACCEPT -s xxx.xxx.xx.xxx -p udp -m multiport --sports isakmp,10000
iptables -A INPUT -j ACCEPT -i tun+
iptables -A OUTPUT -j ACCEPT -d xxx.xxx.xx.xxx -p esp
iptables -A OUTPUT -j ACCEPT -d xxx.xxx.xx.xxx -p udp -m multiport --dports isakmp,10000
iptables -A OUTPUT -j ACCEPT -o tun+

Replace your VPN server’s IP address to the xxx.xxx.xx.xxx.

4. Save the file and close.
5. Change the user-pre file permission back to the way it was:
sudo chmod 440 /etc/firestarter/user-pre

6. Restart Firestarter:
sudo /etc/init.d/firestarter restart

Thanks to Arun for the tips.

Linksys WRT54G Wireless Router Firmware Upgrade

Recently I have a problem where my wireless connection sometimes getting dropped. My Linksys WRT54G Wireless Router having intermittent reboot, especially when there’s a lot of connections, like when BitTorrent is running on one of my machine. I’ve figured out that maybe it’s time to upgrade my router’s firmware. The current version is the initial release version, 7.00.1. The latest firmware for WRT54G version 7 right now is 7.00.6.

The firmware upgrade process is very simple.

1. Download the latest firmware from Linksys website. For my case it’s here. Make sure you’re downloading the correct version for your router.

2. Go to the router’s GUI. It’s usually by opening http://192.168.1.1 with your web browser.

3. At the GUI, go to “Administration”, the to “Firmware Upgrade”.

4. Browse for the firmware file that you have downloaded, and then click “Upgrade”.

5. That’s it. Easy as pie. After the upgrade process completed, the router will reboots itself, and enjoy your new upgraded firmware.

Here’s the release note for version 7.00.6. It’s already been 1 hour since my upgrade process, the BitTorrent is running, and there’s no intermittent reboot or connection drops. Cool.

HTTP Request using cURL for Windows

There’s a variety of ways to perform http request without using your web browser, i.e. using your command prompt. We could use wget for most major Linux distributions, but what about Windows? Recently I’ve found out that cURL might get the job done.

cURL is a command line tool for transferring files with URL syntax. It is free and open source software. One of the use for cURL is to automate unattended file transfers. For example, automating file downloads or getting html output from sites, via a command prompt, a batch file or scheduled job. It is also a good tool for simulating a user’s actions at a web browser, thus a very good tool to perform web application tests.

How to use cURL:

1. Download cURL. Select appropriate version based on your OS.
2. Extract the zip file.
3. Place the “curl.exe” under your C:\WINDOWS directory.
4. Execute it directly from your command prompt:

C:\>curl http://www.wordpress.org

You will see a bunch of http response coming out of your command prompt.

Output http response and save the page locally :
C:\>curl http://www.mydomain.com/mypage.php > mypage.html

Downloading using cURL:
C:\>curl http://www.mydomain.com/downloads/myfile.zip

HTTP Post using cURL:
C:\>curl -d "string_to_post" http://www.mydomain.com/mypage.aspx

There’s a lot more features for cURL, and the manual usage available here.