Networking Forums

Networking Forums > Computer Networking > Linux Networking > OpenSwan - Linux VPN to Linux VPN

Reply
Thread Tools Display Modes

OpenSwan - Linux VPN to Linux VPN

 
 
walt750@gmail.com
Guest
Posts: n/a

 
      06-12-2006, 08:09 PM
I am trying to use 2 linux servers to bridge or route ip. I have tried
using OpenSwan and OpenVPN and cannot get it to work.

The setup is as follows:


InternalNet(10.0.0.0/8) > Linux(216.XXX.XXX.1)> Internet <
Linux(70.XXX.XXX.1) < Internal Net (192.168.XXX.XXX)

OpenSwan has the problem of not setting up the routing correctly on
either sub-network

The routing always comes up work even though the ipsec.conf file seems
to be configured correctly.

The routing on the remote comes up as:

10.0.0.0/8 gw 70.XXX.XXX.XXX when it should be 10.68.0.0/8 gw
216.XXX.XXX.XX1.

I want to be able to use all the resources on the host network. Has
anyone gotten OpenSwan to work?

I can get some of it to work changing the routes manually. But I
shouldn't have to do that.

3 days at it already .... I'm getting dizzy.

Thanks in advance.

 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      06-13-2006, 03:04 PM
(E-Mail Removed) wrote:
> I am trying to use 2 linux servers to bridge or route ip. I have tried
> using OpenSwan and OpenVPN and cannot get it to work.
>
> The setup is as follows:
>
>
> InternalNet(10.0.0.0/8) > Linux(216.XXX.XXX.1)> Internet <
> Linux(70.XXX.XXX.1) < Internal Net (192.168.XXX.XXX)
>
> OpenSwan has the problem of not setting up the routing correctly on
> either sub-network
>
> The routing always comes up work even though the ipsec.conf file seems
> to be configured correctly.
>
> The routing on the remote comes up as:
>
> 10.0.0.0/8 gw 70.XXX.XXX.XXX when it should be 10.68.0.0/8 gw
> 216.XXX.XXX.XX1.
>
> I want to be able to use all the resources on the host network. Has
> anyone gotten OpenSwan to work?
>
> I can get some of it to work changing the routes manually. But I
> shouldn't have to do that.
>
> 3 days at it already .... I'm getting dizzy.
>
> Thanks in advance.


It seems to me that you are having difficulties with
the addresses in a VPN tunnel.

There are 4 IP addresses associated with a VPN tunnel:

- the public address (outside) at the left end,
- the public address (outside) at the right end,
- the private address (inside) at the left end,
- the private address (inside) at the right end.

In your case, the addresses are

- left outside: 216.xxx.xxx.1,
- right outside: 70.xxx.xxx.1,
- left inside: a private address, maybe in another RFC 1918 subnet,
- right inside: a private address, maybe in another RFC 1918 subnet.

You have to think about the IP packet travel in a VPN:

1. A host in the left local subnet sends a packet for
the right local subnet (here: 10.x.y.z -> 192.168.u.w),

2. The left router knows that the packet in destined via the tunnel,
and routes it into the tunnel inside address,

3. The VPN daemon gets the packet via the tunnel pseudo-interface,
encrypts it, and creates a packet to the public network,

4. The left router sends the wrapped, encrypted packet to the
right router,

5. The right router receives the wrapped packet, decrypts it
and feeds it to the network via the tunnel pseudo-interface,

6. The routing in the right router knows how to route the
packet to the ultimate destination host in the local network.

The reverse direction is traversed in the same way, but opposite
direction.

You need routes set up:

- routing via the public network to connect the tunnel outside
addresses together. This goes usually with the default routes
and the routing mechanisms in the public network,

- routing for the right end local net at the left end router
to route via the tunnel inside addresses,

- routing for the left end local networh at the right end router
to route via the tunnel inside addresses.

So, at the router with the address 216.xxx.xxx.1, you need
a route for the 192.168.u.w network via the tunnel inside addresses,
and at the router with the address 70.xxx.xxx.1, you need
a route for the 10.x.y.z network via the tunnel inside addresses.

The above instructions assume that the routers are set up as
default gateways for the local network hosts. If it is not so,
you need to set the remote network routes at the local network hosts
with the local router set up a the gateway.

Still or more confused?

--

Tauno Voipio
tauno voipio (at) iki fi

PS. My preference for this kind of task is OpenVPN with the default
UDP transport (UDP/1194).

TV
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Openswan - XP->Linux tunnel DJ Linux Networking 0 01-25-2007 04:09 PM
Re: Newbie Help with Linux VPN and OpenSwan. Vin McLellan Linux Networking 1 03-02-2005 05:57 PM
Newbie Help with Linux VPN and OpenSwan. Google Mike Linux Networking 1 03-02-2005 06:52 AM
Red Hot Linux v9.0 [2 DVDs]. Red Hot Linux v9.0 [3 CDs]. Redhat Enterprise Linux ES v3.0 REPACK [4 CDs]. Mandrake Linux 9.2 [3 CDs] -new ! TEL Linux Networking 0 12-01-2003 12:06 PM
Red Hot Linux v9.0 [2 DVDs]. Red Hot Linux v9.0 [3 CDs]. Redhat Enterprise Linux ES v3.0 REPACK [4 CDs]. Mandrake Linux 9.2 [3 CDs] - new ! TEL Linux Networking 0 11-29-2003 11:27 AM



1 2 3 4 5 6 7 8 9 10 11