# /etc/ipsec.conf - FreeS/WAN IPsec configuration file

version 2.0

config setup
	# put the logs in /tmp for the UMLs, so that we can operate
	# without syslogd, which seems to break on UMLs
	plutostderrlog=/tmp/pluto.log

conn OEself
	auto=ignore

conn us-to-anyone
	also=us
	also=me-to-anyone

conn me-to-anyone
	right=%defaultroute
	left=%opportunistic
	# uncomment to enable incoming; change to auto=route for outgoing
	#auto=add

# food groups: clear, clear-or-private, private-or-clear, private, block
# Tempting to use "postcard" instead of "clear"
# these are for a subnet behind us.
conn us-clear
	also=clear
	also=us

conn us-clear-or-private
	also=clear-or-private
	also=us

conn us-private-or-clear
	also=private-or-clear
	also=us

conn us-private
	also=private
	also=us

conn us-block
	also=block
	also=us

# these are for self
conn clear
	type=passthrough
	right=%defaultroute
	left=%group
	#auto=route

conn clear-or-private
	type=tunnel
	right=%defaultroute
	left=%opportunisticgroup
	# by using "add", we get passive.
	# but this does not actually implement "clear" :-(
	failureshunt=passthrough
	#auto=add

conn private-or-clear
	type=tunnel
	right=%defaultroute
	left=%opportunisticgroup
	failureshunt=passthrough
	#auto=route

conn private
	type=tunnel
	right=%defaultroute
	left=%opportunisticgroup
	# without failureshunt, renegotiation will be tried.
	failureshunt=drop
	#auto=route

conn block
	type=reject
	right=%defaultroute
	left=%group
	#auto=route

# VPN connection
conn west-east
	also=west-east-base
	#auto=start

conn west-eastnet
	also=west-east-base
	also=eastnet
	#auto=start

conn westnet-east
	also=west-east-base
	also=westnet
	#auto=start

conn west-east-pass
	also=west-east-base
	type=passthrough
	#auto=start

conn westnet-east-pass
	also=west-east-base
	also=westnet
	type=passthrough
	#auto=start

conn west-eastnet-pass
	also=west-east-base
	also=eastnet
	type=passthrough
	#auto=start

conn westnet-eastnet-ipcomp
	compress=yes
	also=westnet-eastnet

conn westnet-eastnet
	also=west-east-base
	also=westnet
	also=eastnet
	#auto=start

conn westnet-eastnet-pass
	also=west-east-base
	also=westnet
	also=eastnet
	type=passthrough
	#auto=start

conn westnet-eastnet-drop
	also=west-east-base
	also=westnet
	also=eastnet
	type=drop
	#auto=start

conn us
	also=eastnet

conn them
	also=westnet

conn eastnet
	rightsubnet=192.0.2.0/24

conn westnet
	leftsubnet=192.0.1.0/24

conn west-east-base
	# Left security gateway, subnet behind it, next hop toward right.
	left=192.1.2.45
	leftid=@west
	leftrsasigkey=0sAQNzGEFs18VKT00sA+4p+GUKn9C55PYuPQca6C+9Qhj0jfMdQnTRTDLeI+lp9TnidHH7fVpq+PkfiF2LHlZtDwMurLlwzbNOghlEYKfQ080WlOTTUAmOLhAzH28MF70q3hzq0m5fCaVZWtxcV+LfHWdxceCkjBUSaTFtR2W12urFCBz+SB3+OM33aeIbfHxmck2yzhJ8xyMods5kF3ek/RZlFvgN8VqBdcFVrZwTh0mXDCGN12HNFixL6FzQ1jQKerKBbjb0m/IPqugvpVPWVIUajUpLMEmi1FAXc1mFZE9x1SFuSr0NzYIu2ZaHfvsAZY5oN+I+R2oC67fUCjgxY+t7
	leftnexthop=192.1.2.23
	# Right security gateway, subnet behind it, next hop toward left.
	right=192.1.2.23
	rightid=@east
	rightrsasigkey=0sAQN3cn11FrBVbZhWGwRnFDAf8O9FHBmBIyIvmvt0kfkI2UGDDq8k+vYgRkwBZDviLd1p3SkL30LzuV0rqG3vBriqaAUUGoCQ0UMgsuX+k01bROLsqGB1QNXYvYiPLsnoDhKd2Gx9MUMHEjwwEZeyskMT5k91jvoAZvdEkg+9h7urbJ+kRQ4e+IHkMUrreDGwGVptV/hYQVCD54RZep6xp5ymaKRCDgMpzWvlzO80fP7JDjSZf9LI/MMu6c+qwXIKnWoNha75IhFyLWniVczxK2RdhmMhLsi0kC0CoOwWDSIEOb+5zbECDjjud+SF5tT8qRCWnSomX8jtbCdZ50WraQlL
	rightnexthop=192.1.2.45

