Linux kernel 2.6 IPSEC: single tunnel for multiple remote networks 
Saturday, June 23, 2007, 04:07 PM - Linux, Networking
My workplace has a Fortinet IPSEC VPN, which I connect to from my Linux server. There are multiple subnets at work, like 192.168.0.0/21 and 10.2.2.0/24, and this was causing problems.

Everything was working great, except I could only connect to computers on one subnet at a time. If I connected to a computer on the other subnet, the first subnet would stop working, and I would have to restart racoon to make it work again (actually I just had to reset my SAD entries, with setkey -F, and let it re-associate).

To make a long story short, the problem was that Fortinet cannot handle multiple tunnels like that. If you establish a second tunnel, it uses the keys negotiated in that tunnel from then on. It doesn't use the first tunnel. This post explains it a little better.

Well I never wanted two tunnels in the first place. I only want one tunnel even though there are multiple subnets on the remote side. To fix it, I simply had to use require instead of unique on my SPD entries!

I'm using Debian's racoon-tool to create my spd entries (and racoon.conf). With racoon-tool, you simply have to add the level: require option to each of your connections in your racoon-tool.conf.


BTW, my tunnel looks like this:
a.b.c.d/32 => a.b.c.d => x.y.z.w => 192.168.0.0/21

not like this:
192.168.8.0/24 => a.b.c.d => x.y.z.w => 192.168.0.0/21

Since my Linux server performs NAT (MASQUERADE) in iptables, I only need the tunnel to go to my server, not to my whole LAN subnet. Somehow it is smart enough to do NAT and then encrypted on the way out, and decrypt then un-NAT on the way in, or something like that. BTW, it's so smart that even when I was having problems with two tunnels from my server, the computers inside my LAN could connect to both remote subnets with no problem! I believe this is due to a special MASQ table that can dynamically associate SPI values. This page explained it well for me.

[ add comment ]   |  permalink  |   ( 2.7 / 144 )
No more posting 
Tuesday, May 15, 2007, 08:11 AM - Personal, Networking
Spammers got me again, even with captchas in place.

I don't have time to sit around and delete spam posts all day, so I'm going to have to disable comments, sorry.

[ add comment ]   |  permalink  |   ( 2.9 / 117 )
Source not found in Eclipse 3.2.2 on Ubuntu Feisty Fawn 
Wednesday, May 9, 2007, 02:15 PM - Linux, Programming
When debugging a Java program, breakpoints would cause the program to stop, but instead of showing my source code, it was showing a "source not found" in red. This was working fine before upgrading to feisty.

I tried editing the source lookup path to no avail.

The issue was Eclipse running under the java-gcj VM. I edited my /etc/eclipse/java_home file and placed /usr/lib/jvm/java-1.5.0-sun at the very top and restarted Eclipse. This time it ran under Sun's VM and the problem went away!


[ add comment ]   |  permalink  |   ( 2.3 / 193 )
All fixed; capchas in place 
Sunday, October 8, 2006, 01:13 AM - Networking
I just had to apt-get install php4-gd. Now capcha are graphical and hopefully that will keep spammers away, for the most part.

[ add comment ] ( 6 views )   |  permalink  |   ( 2.9 / 165 )
Spammers got me, comments disabled 
Sunday, October 8, 2006, 12:46 AM - Networking
Sorry everyone, spammers got to my blog and so I've had to temporarily disable comments. Maybe I can set up a captcha or something, then I'll be able to re-enable it.

[ add comment ]   |  permalink  |   ( 2.7 / 120 )

Back Next