LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-14-2010, 01:44 AM   #16
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41

http://www.natecarlson.com/2007/07/3...clientopenswan to be more precise.
 
Old 03-15-2010, 02:38 PM   #17
cecolong
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Rep: Reputation: 0
I received this error from host log:

Mar 15 15:19:19 pluto[12210]: packet from 192.168.50.2:500: received Vendor ID payload [Openswan (this version) 2.6.21 ]
Mar 15 15:19:19 host-lx pluto[12210]: packet from 192.168.50.2:500: received Vendor ID payload [Dead Peer Detection]
Mar 15 15:19:19 host-lx pluto[12210]: "roadwarrior-net"[4] 192.168.50.2 #4: responding to Main Mode from unknown peer 192.168.50.2
Mar 15 15:19:19 host-lx pluto[12210]: "roadwarrior-net"[4] 192.168.50.2 #4: transition from state STATE_MAIN_R0 to state STATE_MAIN_R1
Mar 15 15:19:19 host-lx pluto[12210]: "roadwarrior-net"[4] 192.168.50.2 #4: STATE_MAIN_R1: sent MR1, expecting MI2
Mar 15 15:19:19 host-lx pluto[12210]: "roadwarrior-net"[4] 192.168.50.2 #4: transition from state STATE_MAIN_R1 to state STATE_MAIN_R2
Mar 15 15:19:19 host-lx pluto[12210]: "roadwarrior-net"[4] 192.168.50.2 #4: STATE_MAIN_R2: sent MR2, expecting MI3
Mar 15 15:19:19 host-lx pluto[12210]: "roadwarrior-net"[4] 192.168.50.2 #4: Main mode peer ID is ID_IPV4_ADDR: '192.168.50.2'
Mar 15 15:19:19 host-lx pluto[12210]: "roadwarrior-net"[4] 192.168.50.2 #4: issuer cacert not found
Mar 15 15:19:19 host-lx pluto[12210]: "roadwarrior-net"[4] 192.168.50.2 #4: X.509 certificate rejected

My host ipsec.conf:
version 2.0

config setup
interfaces=%defaultroute
nat_traversal=no

conn %default
keyingtries=1
compress=yes
disablearrivalcheck=no
authby=rsasig
leftrsasigkey=%cert
rightrsasigkey=%cert

conn roadwarrior-net
leftsubnet=192.168.50.0/255.255.255.0
also=roadwarrior

conn roadwarrior
# left=%defaultroute
left=192.168.50.1
leftcert=host.example.com.pem
right=%any
rightsubnet=vhost:%no,%priv
auto=add
pfs=yes

Files on host machine:
/etc/ipsec.d/private/host.example.com.key
/etc/ipsec.d/crls/crl.pem
/etc/ipsec.d/certs/host.example.com.pem
/etc/ipsec.d/cacerts/cacert.pem


My client ipsec.conf:

version 2.0

config setup
interfaces=%defaultroute
nat_traversal=no

conn %default
keyingtries=1
compress=yes
disablearrivalcheck=no
authby=rsasig
leftrsasigkey=%cert
rightrsasigkey=%cert

conn roadwarrior-net
leftsubnet=192.168.50.0/255.255.255.0
also=roadwarrior

conn roadwarrior
# left=%defaultroute
left=192.168.50.2
leftcert=clienthost.example.com.pem
right=192.168.50.1
rightsubnet=host.example.com.pem
auto=add
pfs=yes


Files on host machine:
/etc/ipsec.d/private/clienthost.example.com.key
/etc/ipsec.d/crls/crl.pem
/etc/ipsec.d/certs/host.example.com.pem
/etc/ipsec.d/certs/clienthost.example.com.pem
/etc/ipsec.d/cacerts/cacert.pem

where host.example.com.pem is copied from host. All other files are generated separately using CA.sh on client machine.
 
Old 03-15-2010, 05:39 PM   #18
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
The client certificate is being rejected because it was not issued by a CA the server trusts.
 
Old 03-16-2010, 08:11 AM   #19
cecolong
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Rep: Reputation: 0
Both client and server have Hardy Ubuntu 8.04. The client certificate was generated by the client CA. Since both client and server have the same Ubuntu installed from the same DVD, I expect CA.sh on the client is the same as the server. I wonder what else the server expects?
 
Old 03-16-2010, 08:13 AM   #20
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
That's not how it works, you need to create a CA then let the CA issue and sign certificates for both the server and the client.
 
  


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
Running Openswan for IPSEC VPN agentc0re Slackware 1 05-13-2008 11:13 AM
Openswan IPSEC issue prashanlk Linux - Networking 0 01-09-2008 03:00 AM
IPSEC openswan prashanlk Linux - Networking 1 12-28-2007 10:47 AM
Openswan IPSEC server prashanlk Linux - Networking 3 12-11-2007 10:13 PM
IPSec OpenSWAN probs zmeda Linux - Networking 0 07-12-2006 05:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:05 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