Posts Tagged ‘gutsy’

Ubuntu IPSEC/L2TP VPN Client
Thursday, May 15th, 2008

I’ve recently been tasked on implementing a linux vpn client for our IPSEC/L2TP based vpn. This task would have been extremely difficult if not for the efforts of Jacco de Leeuw (for his “Using Linux as an L2TP/IPsec VPN client” documentation) and Scott Myron et al. from Indiana University (“Linux L2TP over IPsec VPN Script for IU”).

I’m still waiting on a public revision control system in order to share our current implementation. In the meantime, I just wanted to share a couple issues I faced with the default Ubuntu (7.10/8.04) Openswan package (2.4.6):

Bad route fix

Update – This is not necessary. See the comment added by Alucard below regarding “leftnexthop”.

After bringing up the ipsec connection

~# ipsec setup start
~# ipsec auto --up VPN

I still cannot reach the vpn server (there is no route). After further investigation the route added by this version of openswan is incorrect. So I get something like the following

~# ip route show
...
xxx.xxx.xxx.xxx dev eth0 scope link
...
default via yyy.yyy.yyy.yyy dev eth0
...
~# ping xxx.xxx.xxx.xxx
PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) 56(84) bytes of data.
From zzz.zzz.zzz.zzz icmp_seq=1 Destination Host Unreachable
From zzz.zzz.zzz.zzz icmp_seq=2 Destination Host Unreachable
From zzz.zzz.zzz.zzz icmp_seq=3 Destination Host Unreachable
...

where xxx.xxx.xxx.xxx is the ip of the vpn server, yyy.yyy.yyy.yyy is the gateway ip and zzz.zzz.zzz.zzz is the local ip.
To fix this, I remove the bad route and add a new route through the gateway as follows:

~# ip route del xxx.xxx.xxx.xxx
~# route add -host xxx.xxx.xxx.xxx gw yyy.yyy.yyy.yyy

The result is

~# ip route show
...
xxx.xxx.xxx.xxx via yyy.yyy.yyy.yyy dev eth0
...
default via yyy.yyy.yyy.yyy dev eth0
...
~# ping xxx.xxx.xxx.xxx
PING xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) 56(84) bytes of data.
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=1 ttl=126 time=9.46 ms
64 bytes from xxx.xxx.xxx.xxx: icmp_seq=2 ttl=126 time=20.3 ms
...

NAT Traversal

The 2.4.6 Openswan version provided in Ubuntu (7.10/8.04) does not support NAT traversal. For more information, read Jacco’s NAT Traversal documentation.

Here are (roughly) the steps I used to build/install a patched version of Openswan 2.4.12 with NAT-T support:

1 – Download the openswan source:

~$ wget http://openswan.org/download/openswan-2.4.12.tar.gz

2 – Unpack the source:

~$ tar xzvf openswan-2.4.12.tar.gz

3 – Move into source directory:

~$ cd openswan-2.4.12/

4 – Get the patch:

~$ wget http://www.jacco2.dds.nl/networking/patches/openswan-allow_MS_bad_proposal.patch

5 – Patch the source:

~$ patch -p0 < openswan-allow_MS_bad_proposal.patch

6 – Install build dependencies:

~$ sudo apt-get -y install build-essential man2html libgmp3c2 libgmp3-dev

7 – Make the programs and install (as root)

~$ make programs
~$ sudo make install

Using the documentation referenced above, along with these workarounds, you should be able to connect an Ubuntu 7.10/8.04 client to an IPSEC/L2TP VPN. Hope that helps!

Reclaim Desktop Space Using Synergy
Monday, April 7th, 2008

Over the past year and a half I’ve had to relocate my office more times than Milton Waddams, so I’ve become accustomed to traveling light. Each move, however, has required me to adapt to a new desktop arrangement since the office furniture isn’t standard between buildings (or certain locations within them). In the most recent move this past week, I lost about a third of my desktop space and quickly realized I had to modify my cramped arrangement somehow.

Work provides me with a desktop computer, but I prefer to do all of my development work on my laptop which I carry back and forth between work and home. At work, I “dock” the laptop by plugging in a USB keyboard and mouse and connecting an additional monitor for a dual-head setup. So, all together I had two monitors, a laptop, two keyboards and two mice/micepads, a coffee mug, a water cup and a useless phone…but no space for note taking. (Yeah, I still use pen and paper!) Bottom line, I needed to eliminate some clutter on my desktop and the obvious choice was to eliminate a mouse/keyboard pairing.

While typing on the laptop keyboard and navigating around with the touchpad are tolerable for short periods of work, I need an external mouse and keyboard in order to work on my laptop all day. So how do I share a single mouse and keyboard between two computers, each with its own display(s)? Fortunately, a coworker had mentioned Synergy earlier this year and I figured I’d give it a shot. I’m using Ubuntu Gutsy Gibbon on both machines and a quick check of Synaptic showed that Synergy was available for install, so I installed it on the two computers. After a simple configuration, I’m now using the mouse and keyboard connected to my desktop computer seamlessly with the laptop! Excellent utility!

Sticking with Ubuntu…for now
Wednesday, January 9th, 2008

A Brief Historical Background (Or, Why Linux?)

My father is a computer engineer, so I grew up around several different predominately PC-based computers and have witnessed every stage in the development of Windows. We had a few different Macs sitting around the house as well, which were neat because they were different and easy to use, but all the cool games could only be played on the PCs. I have a vague memory of seeing a weird computer in my father’s office that started up with “OK” written in green on every line, but couldn’t make it work at the time ;-)

As a result of this exposure, I used Windows growing up and throughout my education until I wandered into the Computer Science program at SUNY Potsdam. Up to that point, my computer was a platform for gaming, word processing and, eventually, web browsing…and it worked fine for those purposes. I also never had to pay a dime for any of the software I used; it was always handed to me. Once the nightmare assignments from Dr. Charles Marshall started piling up, using Windows (98 SE at the time) to do work become more of a task than a tool. There’s nothing like the BSOD when you’re writing up solutions to proofs or trying to implement solutions to problems like the Towers of Hanoi, Dining Philosophers and, one of my favorites, the permutation generator. Dr. Marshall’s education by intimidation drove me (frantically, in fact) to learn several lessons that I probably otherwise would not. The power of the GNU/Linux toolset was one of the many lessons. While the learning curve was steep, as is the case with all good lessons, the effort was immensely rewarding. Therefore, fed up with reboots and enlightened after a trial by fire, I’ve been using Linux as my OS of choice since 2000, only resorting to Windows when there is no other alternative.

My first Linux installation was Red Hat Linux 6.2, and I continued with the Red Hat lineup through Fedora Core 4. I don’t remember what it was for sure, maybe it was the desire to explore or something that turned me off during the upgrade to Core 5, but I finally jumped ship. After first trying SuSE and Debian, I tried and ended up choosing Ubuntu 6.06 LTS (Dapper Drake); it was the easiest install of any distribution I had used by that time and it “just worked”.

The Issue

Since I currently work in a “Windows shop” that uses Exchange, I use Evolution with the exchange-connector as a client for mail and calendaring. The version of Evolution in Dapper had several bugs that are fixed in the latest Ubuntu 7.10 (Gutsy Gibbon) release, making interaction with Exchange much smoother. Outlook Web Access, by the way, is just about useless without running Internet Explorer, and I refuse to run a virtual machine to communicate. I stuck with Dapper as long as I possibly could (over a year, which is long for me), but finally caved in to the desire to run the latest versions of Firefox, Gnome, Evolution, etc.

I upgraded to Gutsy, as soon as it was released, on my Dell Optiplex 745 at work and my old Dell 8200 at home and was pleased overall, despite some minor annoyances (such as the unavoidable brown background and occasional garbled screen during login). The experience running Gutsy on my Toshiba Tecra A8 laptop, however, has been buggy enough to consider switching to another distribution. Power management has seen a serious regression in this latest release resulting in my laptop freezing during suspend/hibernate. Despite my best efforts to resolve the issue over the course of many wasted hours, I’ve resorted to disabling the power management features as best as I know how. This is a serious issue, though, for a laptop that already suffers from lousy battery life, and I still have a freeze if I sit at the GDM prompt for long or close my laptop lid. Also, every once in a while when I login to Gnome, all of my desktop applets will be sitting in their own little windows instead of docked as I last left them, requiring me to logout and log back in again. While these may be upstream issues for which the Ubuntu team is not directly responsible, they weren’t issues I was dealing with in Dapper. I’m concerned that the focus on usability and “it just works” has been lost somewhat, in favor of the things that don’t really matter like jiggly windows. Now that I think about it, this may have been the reason I left Fedora during the Core 5 upgrade.

Make the Switch?

I just got a “new” used Dell SX270N SFF desktop to replace my old Dell 8200 desktop. It came along with the bad capacitor issue, but, fortunately, Dell is covering replacement motherboards under an out-of-warranty extension program until the end of January. I called Dell support and, after a satisfactory (but somewhat lengthy) process, had a replacement motherboard on the way. A few days later the motherboard arrived. I was pleasantly surprised and have to give Dell kudos here for the excellent service and quick response. The replacement was a little tricky given the size of the desktop, but I was able to swap out the damaged board and everything is, apparently, working well.

My next step was to install Windows XP SP2, because…well hell, some people just can’t do without it. I have a rant stored up about open standards and proprietary formats that I’ll certainly be sharing at some point, but this is not that post. Anyway, I ripped through the install process, allowing Windows to take up the entire drive, and performed the requisite update…reboot…repeat.

Onto Linux, since it’s what I’ll be using 99% of the time anyway. I read that Fedora 8 may be better then Ubuntu this time around, so I thought I’d give it a shot and install it on the new desktop. If things worked out, maybe I’d switch and have working power management on my laptop. I threw in the Fedora Core 8 Live CD, and, I have to admit, things looked pretty slick and familiar to my experience with the Ubuntu Live CDs. Next I clicked on the link to install Fedora 8 to my hard drive, jumped through a couple hoops and arrived at the point where I had to select the drive to install on. Here’s where things didn’t go so well. Having used the entire partition when I installed Windows, the installer would not allow me to resize the partition as I had become accustomed to doing with Ubuntu. I also couldn’t immediately find a utility like gparted on the install CD. Now consider that I had a Gutsy install disk sitting next to me the whole time, that a New York Rangers game was on (which they lost BTW…but a good game nevertheless), and that I knew I could resize the partition with Gutsy. Did I really try to get Fedora 8 installed? Not a chance. Bottom line, I’m sticking with Ubuntu…for now.

Ubuntu Install Shortcomings

I can’t let Ubuntu off the hook so easy, though. My previous Ubuntu install was an upgrade, so I didn’t have the luxury of working with the partitioning tools during the install. In this case, a fresh install to my desktop, I was exposed to this confusing interface again. It’d be great if the interface had some description of what was going on and/or what should be done. Some pointers for those of us that either 1) don’t know or 2) can’t remember the requisite knowledge that makes the process bearable. We are, after all, playing with fire during this step. I was able to resize the partition, but not to the exact size I specified (another potential source of confusion). Then I had to juggle some create/delete/modify partition operations to get everything setup the way it should be. For example, I like to have a separate /home partition for those instances where I want or need to do a fresh install, so that I can keep my personal data in tact. As far as I can remember, the default partitioning gives you a single / partition made from existing free space.

I like to think of myself as a capable computer professional, but I still get a little nervous during this step and will typically reference some external documentation just to clarify my understanding of the details. Couldn’t/shouldn’t this information be readily available during the process itself? Perhaps a little “hand holding” isn’t all that bad? I’m not the only person thinking along these lines:

Considering that this is such a vital and dangerous stage of installing Ubuntu, I think this topic is a bit blasé. It needs a lot more detail and clarification, for instance:

1) It says “Select the partition that you want to resize”. Most users will want to create a new partition, not resize one. I assume the process might be resize existing partition, then use free space to create another, but it’s not obvious at all.

2) How do they know which partition they want to install on? Partitions seem to be only identifiable by their size.

3) If the user has to create a new partition (as most would do), should they select “New partition table” (on what i gather is the physical drive), or “Edit partition” (on what looks like existing partitions)?

4) Most importantly: Exactly which files will be destroyed if the user does dare to create a new partition table / edit a partition? Will undo really work, restoring deleted files?

Until this critical aspect of installation is clarified, I won’t be installing Ubuntu anytime soon, and I’m a lot geekier than the average. I know any normal user would _never_ get through that partitioning wizard. I reckon the only people getting through this wizard are experienced partitioners and people with a completely blank drive. That’s not a lot of people.

I was successfully able to get through the installation, but I wonder how many potential converts are turned away or fail in their attempts because of lack of clarity in the most critical of installation steps?

What’s Your Point?

Now I’m not, currently, a contributing member of either the Fedora or Ubuntu community and could easily be told to “put up or shut up”, but I am an advocate for open source and contribute when and where I can. I’m also aware of the impact of buggy and/or difficult to use features as a driving force for change when considering particular operating systems or, in the case of Linux, a particular distribution. If there is a point to this, it’s that examples like the BSOD in Windows, failing suspend/hibernate in Ubuntu and the lack of partition resizing support in Fedora need particular attention, especially when trying to entice people away from one OS or distribution to another. Bad impressions are hard to shake.

(GNOME) Evolution extremely slow
Saturday, December 8th, 2007

I have evolution 2.12.1 installed on Ubuntu 7.10 (Gutsy) along with the evolution-exchange plugin on my home desktop and laptop. For some time now, I’ve been unable to figure out why I can connect to exchange with no problems from my desktop, but not from my laptop. All operations using evolution on my laptop would take several minutes, or sometimes it seemed like everything would grind to a halt, leaving evolution completely unusable. I spent some time last night trying to get to the bottom of things, and stumbled across a thread that helped me make some progress. Thanks to joshmachine’s suggestion to start evolution with the E2K_DEBUG environment variable, something like

$ export E2K_DEBUG=4; evolution

I could view some exchange connector debugging output to figure out that evolution was timing out when trying to connect to the global catalog server I had configured. It turns out that this was the one setting these machines didn’t have in common! When I cleared the setting, everything worked flawlessly…well, almost. Now I have to figure out what’s causing the connection to the directory server to fail.

Something to add to the never ending list of things to do:
- Figure out why there isn’t a command line option in evolution to enable or increase the verbosity of debugging output for evolution and it’s plugins.

Powered by Laughing Squid