Wednesday, August 26, 2009

Ubuntu VPNC Magic MTU!

For several weeks I have been struggling on and off with VPNC and Ubuntu. I would attempt to start VPNC and receive the following error:
vpnc: receiving packet: Message too long

After googling countless strings, I finally found the answer here. Turns out that the MTU Comcast gives me on my linux router via DHCP is 576:
eth1      Link encap:Ethernet  HWaddr 00:1a:4d:25:c9:e2
inet addr:71.00.00.000  Bcast:255.255.255.255  Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST  MTU:576  Metric:1
RX packets:270273362 errors:0 dropped:0 overruns:0 frame:0
TX packets:69828544 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2837531408 (2.6 GiB)  TX bytes:1325116523 (1.2 GiB)
Interrupt:18 Base address:0xe000

Because my desktop's MTU was set at 1500, the ipsec packets became fragmented and VPNC pooped its pants. Setting the MTU to 576 solved the problem INSTANTLY:
ifconfig eth1 mtu 576

I hope this helps someone else!

0 comments:

Post a Comment