Monday, January 26, 2009

pptp problems with ubuntu intrepid ibex

ibex
Photo by lightmatter

There have been some networking bugs introduced in Intrepid Ibex.

One that I found particularly difficult to resolve was a problem with the pptp connection. Thanks to the power of Google and the collective wisdom of other Ubuntu users, I found a workaround. I am posting it here in hopes that other people may be able to find it a little easier, and if I eventually reinstall Ibex, I don't want to have to go looking.

First, you need to test to see if your problem is the same as mine. Fire up your pptp vpn connection, and run the following command (in the terminal):

ifconfig

In the output, look for the "ppp0? section, a few lines into that section you will see the MTU size.

ppp0

Link encap:Point-to-Point Protocol
inet addr:xxx.xxx.xxx.xxx  P-t-P:xxx.xxx.xxx.xxx  ...
UP POINTOPOINT ...  MTU:1416 Metric:1

Now you can try to change that MTU size (to something smaller) with a command like this:

sudo ifconfig ppp0 mtu 512

You will want to try some different values to find the sweet spot, but I recommend starting low and working your way up. Once you find a good value for the mtu, you can make the change permanent by editing your /etc/ppp/options file. Search that file for the mtu section, and you will find a line that looks like this:

#mtu <n>

Just uncomment that line and change <n> to your desired MTU size...

mtu 512

...save it, then restart your pptp vpn connection. If you want to confirm that the new MTU size stuck, just run ifconfig again. Hope that helps