Monday, November 30, 2009

Our New Anthem - Eish :-|

VPN Issues on Ubuntu

Well this one has been causing me to pull my hair out for a couple of weeks. I was using the Cisco VPN client for Linux put got really tried of having to recompile it every time I did a Kernel update. So I switched over to vpnc the VPN stuff which works under network manager in Ubuntu. At first it seemed to work nice, but I found the connection was 'freezing' after I sshed into a server over the VPN. An example of this would be ssh to server, then run ls which works fine, then run ls -l and the connection 'freezes'. If I open another terminal sesssion to the server it would open fine, but ls and then ls -l would 'freeze' the connection. So after some digging our found out it had have something to do with my MTU setting. I still have a Windows VM and tested out the VPN their and used putty to ssh to the server and had no issues. I tried setting the MTU on my eth0 or wlan0 but no joy. Finally I found I needed to set the MTU on the tun0 connection like this to get it to work:

sudo ifconfig tun0 mtu 576

This mtu is very small, but I think its a setting on their side that maybe someones forgot to update since the days of dail-up connections. I am also glad to report the VPN connection is now working 'sharp-sharp'. :-)

Thursday, November 26, 2009

How to rename file extentions in Linux

This is a nice command to basically rename all .csv files in a directory to .bak

for x in *.csv; do mv "$x" "${}.bak"; done

Wednesday, November 11, 2009

Axis 2 get client's IP address

This seems to be the easiest way to do it:

MessageContext msgContext = MessageContext.getCurrentMessageContext();
String ip = (String) msgContext.getProperty(MessageContext.REMOTE_ADDR);

Also required:

import org.apache.axis2.context.MessageContext;

Eclispe Button Problem on Ubuntu 9.10

Had a problem with Eclipse where I could not click on the buttons after upgrading to 9.10

This fixed it: