Setting up OpenSwan

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?
Who is Participating?
nociSoftware EngineerCommented:
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.
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:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.