We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Setting up OpenSwan

pucko
pucko asked
on
Medium Priority
1,025 Views
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?
Comment
Watch Question

Artysystem administrator
Top Expert 2007

Commented:
Hi.
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:
racoon
setkey

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

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

Software Engineer
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
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
     type=tunnel
     auto=start
     rekey=yes
     #Diffie-Hellman group: 2 (1024 bits)
     pfs=yes
     #Encryption algorithm: AES, missing is the strength...
     #Hash method: SHA1
     ike=aes???-sha1
     #aes128, aes192 aes256???
     #IKE key lifetime: 28800sec
     ikelifetime=28800
     #Encryption algorithm: AES
     #Hash method: SHA1
     esp=aes???-sha1
     #aes128, aes192 aes256???
     #Diffie-Hellman group: 2 (1024 bits), was set before pfs=yes
     #IPsec key lifetime: 3600sec
     keylife=3600
     #Aggressive mode: disabled
     aggrmode=no
     # Still missing
     right=
     rightid=
     rightsubnet=
     authby=                            
     left=
     leftid=
     leftsubnet=

Possibly on your side....
     {left|right}nexthop
     {left|right}sourceip
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.
         

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.