Setting up OpenSwan

Posted on 2009-02-18
Medium Priority
Last Modified: 2012-05-06
Need help to set up openswan:

I Got this info from the "other side"

ncryption method: IKE
Transforms: ESP
IKE Phase1:
Encryption algorithm: AES
Hash method: SHA1
Diffie-Hellman group: 2 (1024 bits)
IKE key lifetime: 28800sec
IKE Phase2:
Encryption algorithm: AES
Hash method: SHA1
Diffie-Hellman group: 2 (1024 bits)
IPsec key lifetime: 3600sec
Aggressive mode: disabled

Can someone help me with this?
Question by:pucko
LVL 27

Expert Comment

ID: 23677025
That's not enough to setup OpenSWAN or ipsec. It seems just a part of debug log of ipsec negotiation.
You should also know:
- what authentication scheme will be used (x.509, xauth user:password, shared key, ...) and the passwords/certs itself
- remote peer's IP
- remote peer's VPN network address

Why do you need OpenSWAN? You need it only if you are on 2.4.x kernel (run 'uname -r' command to see your Linux version)

Currently there is another ipsec implementation in Linux (NETKEY). It's native and it uses native tools:

Read manual pages for them: 'man setkey', 'man racoon'.

You may also use no-native StrongSWAN: http://www.strongswan.org/

LVL 41

Accepted Solution

noci earned 1000 total points
ID: 23760145
As such there is nothing wrong with openswan... (it is a fork from freeswan just like strongswan).
 Here is the translation of your profiles, as you can see there are quite some bits missing.
(As was mentioned by Nopius before).

connection XXXXX
     #Diffie-Hellman group: 2 (1024 bits)
     #Encryption algorithm: AES, missing is the strength...
     #Hash method: SHA1
     #aes128, aes192 aes256???
     #IKE key lifetime: 28800sec
     #Encryption algorithm: AES
     #Hash method: SHA1
     #aes128, aes192 aes256???
     #Diffie-Hellman group: 2 (1024 bits), was set before pfs=yes
     #IPsec key lifetime: 3600sec
     #Aggressive mode: disabled
     # Still missing

Possibly on your side....
Depending on use of certificates entries for certificates.

In ipsec.secrets you need to add the right secrets (rsasig key, CA certificates, shared secret)
I do like free/openswan because they add extra interfaces (ipsec0 .. ) which makes a lot more sense to
use iptables on packets that travel through the tunnels. Without the ipsecX device you also need to add special rules in the NAT table to prevent packets going through the tunnel from being natted.
At least when KLIPS is used.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question