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.

Google Chrome, a browser by Google

It seems now Google is working on their own web browser, Google Chrome. It’s going to be designed from scratch based on today’s web application needs, and it’s open source!

Here’s the link to the whole comic book explaining Google Chrome.

Taken from the official Google Blog.

UPDATE: Google Chrome site just launched.

UPDATE 2: I’ve just installed Google Chrome on my Windows 2003 (this post is edited using Chrome). I have to admit, the features and stability really impresses me. There’s an import feature to migrate all your bookmarks, form fields and saved passwords from Firefox or IE. Bookmarking a page is as easy as a single click.

All the tabs are detachable to create a new window by simply dragging the tab, and much more. I just can’t wait for them to release a Linux version of Chrome.

Few screenshot is available after the jump.