Setting up OpenSwan

Posted on 2009-02-18
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

    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:

    LVL 39

    Accepted Solution

    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

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    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…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now