LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-03-2013, 11:02 AM   #1
xeon123
Member
 
Registered: Sep 2006
Posts: 374

Rep: Reputation: 16
Set up IPSec connection: address family inconsistency in this connection=2 host=2


I'm trying to set an IPSec tunnel between 2 hosts, but I get this error:
Code:
Apr  3 15:45:26 ip-10-0-0-216 ipsec__plutorun: adjusting ipsec.d to /etc/ipsec.d
Apr  3 15:45:26 ip-10-0-0-216 pluto: adjusting ipsec.d to /etc/ipsec.d
Apr  3 15:45:26 ip-10-0-0-216 ipsec__plutorun: 023 address family inconsistency in this connection=2 host=2/nexthop=0
Apr  3 15:45:26 ip-10-0-0-216 ipsec__plutorun: 037 attempt to load incomplete connection
Apr  3 15:45:26 ip-10-0-0-216 ipsec__plutorun: 021 no connection named "vpc1-to-vpc2"
Apr  3 15:45:26 ip-10-0-0-216 ipsec__plutorun: 000 initiating all conns with alias='vpc1-to-vpc2' 
Apr  3 15:45:26 ip-10-0-0-216 ipsec__plutorun: 021 no connection named "vpc1-to-vpc2"
I've 2 hosts with these IPs:

Host A
Code:
Public IP: 54.236.163.71
Public DNS: ec2-54-236-163-71.compute-1.amazonaws.com
Private DNS: ip-10-0-0-216.ec2.internal	Product Codes:
Private IPs: 10.0.0.216/16
Host B
Code:
Public IP: 54.246.211.133
Public DNS: ec2-54-246-211-133.eu-west-1.compute.amazonaws.com
Private DNS: ip-172-16-0-104.eu-west-1.compute.internal	
Private IPs: 172.16.0.104
The private addresses are behind a NAT that gives the public address. From the hosts, I can only get the private IPs with "ifconfig -a"


Here are my IPSec connections configuration:
Host A
Code:
conn vpc1-to-vpc2
	type=tunnel
	authby=secret
	left=10.0.0.216
	leftsubnet=10.0.0.0/16
	leftnexthop=%defaultroute
	right=54.246.211.133
	rightsubnet=172.16.0.0/16
	pfs=yes
	auto=start
Host B
Code:
conn vpc1-to-vpc2
	type=tunnel
	authby=secret
	#left=%defaultroute
	left=10.0.0.216
	leftsubnet=10.0.0.0/16
	leftnexthop=%defaultroute
	right=54.246.211.133
	rightsubnet=172.16.0.0/16
	pfs=yes
	auto=start
The secret key files are here:
Host A
Code:
Host A:~$ sudo cat /var/lib/openswan/ipsec.secrets.inc
%any %any: PSK "test"
Host B
Code:
host B:~$ sudo cat /var/lib/openswan/ipsec.secrets.inc
%any %any: PSK "test"
With this configuration I cannot setup a tunnel. I don't understand why I get this problem, because it seems that the IPs are correct. Any help?

Last edited by xeon123; 04-03-2013 at 11:05 AM.
 
Old 04-09-2013, 11:16 PM   #2
sandeep3300
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
Please Put authby=secret insted of pfs=yes, also after doing that restart the ipsec
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection OpenVPN with IPSec eugen55ro Linux - Security 4 01-23-2012 09:05 AM
ssh: connection to host port: 22: Connection timed out lost connection cucolin@ Linux - Server 4 11-22-2011 06:15 AM
Establishing a VPN connection (host to host) using IPSec services adithya24 Linux - Networking 9 06-10-2009 08:44 AM
How do I set up access to multiple subnets on IPsec Connection AIM Systems Linux - Networking 0 03-16-2009 03:39 PM
How to set up ethernet ipsec connection? kornerr Slackware 2 02-11-2006 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration