[Openswan Users] virtual_private vs. rightsubnet

Paul Wouters paul at xelerance.com
Tue Oct 2 12:14:58 EDT 2007

On Tue, 2 Oct 2007, Steffen Pfendtner wrote:

> Well I have a simple roadwarrior setup, no NAT, both parties have a subnet
> behind. And I can see a strange behavior I don't understand concerning the
> usage of virtual_private and rightsubnet parameters.

If there is no NAT-T, then you don't need virtual_private=

> Left:					Right:
> | 84.x.x.x    <----->	141.y.y.y |
> The left side is running the static configuration and the right side is
> a dynamic roadwarrior actually running racoon.
> I am confronted with the following error message on the left side
> IPsecConn"[1] 141.y.y.y #1: cannot respond to IPsec SA request because
> no connection is known for
> ipsec.conf on left side contains:
> virtual_private=%v4:,%v4:,%v4:,%v4:!
> rightsubnet=vhost:%no,%priv

You should have rightsubnet= and leftsubnet=

> Now the funny part, if I change these options in the following way it works
> quite well:
> rightsubnet=
> Nevertheless I have to use the first style setup because the subnet of the
> roadworrier will not be known in all but a testsetup.
> Did I miss anything?

Yes you did. If you are building a subnet-to-subnet tunnel, you will need to
know beforehand what the subnets on either ends will be. You cannot tunnel
"whatever you happen to be on at the time". And even if you could, you would
run into trouble with everyone using and quickly run into
overlapping networks. Unless you assign them, in which case you know them
beforehand, so you can configure them as well.

>   esp=aes128,aes192,aes256,3des

The default is to only suggest aes and 3des, so you can leave this out.

>   ike=aes128-md5-modp1024,aes128-md5-modp1536,aes192-md5-modp1024,aes192-md5-modp1536,aes256-md5-modp1024,aes256-md5-modp1536,aes128-sha1-modp1024,aes128-sha1-modp1536,aes192-sha1-modp1024,aes192-sha1-modp1536,aes256-sha1-modp1024,aes256-sha1-modp1536,3des-md5-modp1024,3des-md5-modp1536,3des-sha1-modp1024,3des-sha1-modp1536

Same here.

Building and integrating Virtual Private Networks with Openswan:

More information about the Users mailing list