Ketan's Musings

Where he blogs about his eclipse musings

Archive for the ‘linux’ tag

Port forwarding using IPTables

with one comment

I’ve got a UT300R2U ADSL router that has a really bad web based UI that did not let me setup some basic port-forwarding rules.

Thankfully the router was a linux based router with telnet installed on it. I was able to log in using the admin user, and set the following iptable rules:


#iptables -I PREROUTING -t nat -p tcp --dport 8080 -i ppp_0_35_1 -j DNAT --to 192.168.1.11:8080
#iptables -I FORWARD -p tcp -d 192.168.1.11 --dport 8080 -i ppp_0_35_1 -o br0 -j ACCEPT
#iptables -I FORWARD -p tcp -s 192.168.1.11 --sport 8080 -i br0 -o ppp_0_35_1 -j ACCEPT

the IP address 192.168.1.11 is the webserver that’s hosting tomcat on port 8080.

Written by Ketan

November 7th, 2007 at 7:28 pm

Posted in General

Tagged with , , , ,

Flash Player on 64-bit FireFox on Linux

with 9 comments

Here’s how to get your firefox running on a 64 bit Linux machine to work with 32 bit plugins. I’ve tried this with gentoo, it should work with ubuntu or kubuntu or any other distro of your choice.

Download and install nspluginwrapper from http://gwenole.beauchesne.info/projects/nspluginwrapper/.

For ubuntu, there are some instructions on how to do this here (http://ubuntuforums.org/showthread.php?t=341727). On gentoo I had to

 #emerge nspluginwrapper

Download the flash installer from the website here: http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_9_linux.tar.gz. Untar the installer:

$ tar -zxvf install_flash_player_9_linux.tar.gz

Step into the installer directory:

cd install_flash_player_9_linux

Edit the installer file:

vi flashplayer-installer #use nano or gedit if you like

Navigate to line 47 (this inside the function exit_cpu) and comment out the line that says exit 1.

# the architecture is not supported
exit_cpu () {
  echo ""
  echo "ERROR: Your architecture, \'$1\', is not supported by the"
  echo "       $PRODUCT installer."
  echo ""
  #exit 1   # this was line 47
}

Install the flash plugin, I used the default paths, you can choose the paths according to what you have on your computer (I used /home/ketan/.mozilla)

./flashplayer-installer

Now verify that the plugin actually got installed in the directory that you specified

$ ls /home/ketan/.mozilla/plugins

Use nspluginwrapper to create a 64-bit wrapper around this 32 bit plugin. (thanks to Lance for a typo update)

$ nspluginwrapper -i /home/ketan/.mozilla/plugins/libflashplayer.so

Now restart firefox, that should get you to run firefox with flash player.

Written by Ketan

August 1st, 2007 at 2:07 pm

Finding a Class in a ton of jars

with 2 comments

This is how I do it. Create a script I call it findclass in some location on the path. /usr/local/bin is a good place, I prefer $HOME/bin. Remember to chmod this script to 755.

#!/bin/bash
find -iname "*.jar" | xargs -i unzip -l {} | less

In case you are new to less, here’s how you navigate:
1. To find a particular class say com.xyz.abc.MyClass, you type:

/com.xyz.abc.MyClass

2. To find what jar contains this class, you type:

?Archive:

Written by Ketan

July 26th, 2007 at 9:16 am

Posted in GNU & Linux,Java

Tagged with , , ,

Some (more) Rants on Lotus Notes 7.0 on Ubuntu

with 6 comments

This post is in addition to my previous Musings on installing lotus notes on Ubuntu.

Here’s another way to make Lotus Notes not work on Ubuntu.

Start up your print server.

Not amused ?

Raghu pointed out to the fact that lotus notes stopped working the day he got his printer installed. It was a surprise to me, but this happened today when I got a printer setup on my laptop.

Try stopping the cups print server, and the hplip services, and start lotus notes. That should get lotus notes running. Start the above services, and lotus notes would stop working!

Amazing, but true. It’s all software written by some brothers in the same trade as I am.

Written by Ketan

March 22nd, 2007 at 6:40 pm

Posted in General

Tagged with , , ,

Musings on installing Lotus Notes 7.0

with 3 comments

The Important Disclaimer: ALL VIEWS POSTED IN THIS PARTICULAR ENTRY ARE THAT OF MY OWN AND DO NOT (NECESSARILY) REFLECT THE OPINIONS OF MY EMPLOYER.

That said, this is in addition to a HOWTO on installing the Lotus Notes 7.0 Client on Ubuntu.

I’d rather that a very popular lotus notes fan tell you more on why lotus notes is a great tool! What I focus here is on some inside stuff that I figured while installing the lotus notes client on my laptop. Stuff that could have possibly been done in a far better way.

I did this merely as an “educational exercise” to understand if it would be possible to fool the installer into thinking that all is fine, so that it can go ahead installing lotus notes. To give you a brief about how the installer works:
Read the rest of this entry »

Written by Ketan

March 8th, 2007 at 11:23 am