Re: OpenSwan - Linux VPN to Linux VPN



walt750@xxxxxxxxx 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
.



Relevant Pages

  • Re: Firewall for broadband connection
    ... > their LAN side and another networks LAN side through the IPSec tunnel. ... > setup router to router IPSec tunnels inside the units that will let you ... > connect to the other network without the need for client type VPN ... > If you want to do a Windows XP PPTP connection to your Dad's computer, ...
    (comp.security.firewalls)
  • Re: ISPs whinging about BBCs iPlayer
    ... It also solves routing problems as IPv6 address are heirarchical - the way ... each network. ... routes for a router that doesnt use defaults to ignore chunks of the total ...
    (uk.telecom.broadband)
  • Re: 2 NICs and routing
    ... The router doesn't need routes added. ... directly connected to each network segment. ... > I have 2 NICS on two sep. networks and one wrkstation on each> cable connected to the server. ...
    (microsoft.public.windows.server.networking)
  • Re: Adding a route question
    ... > I am in the process of setting up a routed network. ... > 2000 router with 2 network cards to each represent the networks. ... if you add RRAS routes ... Now, be careful, since most people connect to the Internet, ...
    (microsoft.public.win2000.networking)
  • Re: Connect to 2 pc behind broadband router
    ... Open multiple ports on the router... ... access all PCs through the tunnel. ... Personally I run RDP through a SSH ... your router minimizing the exposure of your network to the public ...
    (microsoft.public.windowsxp.work_remotely)