This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Setting up X.509 Remotewarrior linux clients

I recently inherited an old Linksys WAP11 and I wanted to use it for a few computers where I'm too lazy to run CAT5.  The remote computers are running FC3 and I would like to set them up as Roadwarrior CA clients.  Is there an Astaro how-to addressing client side setup for linux boxes?  I'm having trouble setting up the remote boxes for use with X.509 certificates.


Tony


This thread was automatically locked due to age.
Parents
  • I neglected to mention what I have done so far:

    What I want to do is:

    pc1------>------802.11bWAP--------------Astaro FW-------------->cable modem
    workstation   untrusted wireless net

    Created CA
    Created CSR pc1
    Signed CSR pc1 w/ CA
    Created New IPSEC Connection
    Name: pc1
    Type: Roadwarrior
    IPSEC Policy: AES
    Auto Packet Filter: On
    Local Endpoint: 802.11 (Network which the WAP is connected to)
    Remote Endpoint: Any
    Local Subnet: None
    Remote Subnet: None
    Authentication of remote Station(s)
    L2TP Encapsulation: Off
    Keys->Selected -> X.509[:P]c1

    CA Management Screen

    CERT+KEY ->pc1 -> Download as PKCS#12

    pc1.zip transferred to pc1

    unzip pc1.zip created:
    CERTIFICATE_pc1.pem
    KEY_pc1.pem

    mv CERTIFICATE_pc1.pem /etc/ipsec.d/certs
    mv KEY_pc1.pem /etc/ipsec.d/private


    /etc/ipsec.conf contains:

    # Add connections here

    version 2

    conn block
        auto=ignore

    conn private
        auto=ignore

    conn private-or-clear
        auto=ignore

    conn clear-or-private
        auto=ignore

    conn clear
        auto=ignore

    conn packetdefault
        auto=ignore

    config setup
            nat_traversal=yes

    # openswan tunnel configuration
    conn road
            authby=rsasig
            left=192.168.0.146   # wireless pc1
            leftnexthop=%defaultroute
            leftid=192.168.0.146
            leftcert=KEY_pc1.pem
            right=192.168.0.254
            rightsubnet=0.0.0.0/0
            rightid=192.168.0.254   # IP of Astaro nic which has the Access Point
            rightcert=any
            auto=add

    #Disable Opportunistic Encryption
    include /etc/ipsec.d/examples/no_oe.conf


    When I did the cut and paste, the tabs under the "conn road" section seem to have gone away.  The ipsec.conf file is a guess for me.  Then I started the ipsec service.


    # service ipsec start

    # ipsec auto --verbose  --up road
    002 "road" #1: initiating Main Mode
    104 "road" #1: STATE_MAIN_I1: initiate
    003 "road" #1: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03] method set to=108 
    002 "road" #1: enabling possible NAT-traversal with method RFC XXXX (NAT-Traversal)
    002 "road" #1: transition from state STATE_MAIN_I1 to state STATE_MAIN_I2
    106 "road" #1: STATE_MAIN_I2: sent MI2, expecting MR2
    002 "road" #1: I did not send a certificate because I do not have one.
    003 "road" #1: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike-02/03: no NAT detected
    002 "road" #1: transition from state STATE_MAIN_I2 to state STATE_MAIN_I3
    108 "road" #1: STATE_MAIN_I3: sent MI3, expecting MR3
    003 "road" #1: ignoring informational payload, type INVALID_KEY_INFORMATION
    003 "road" #1: received and ignored informational message
    003 "road" #1: discarding duplicate packet; already STATE_MAIN_I3
    010 "road" #1: STATE_MAIN_I3: retransmission; will wait 20s for response
    003 "road" #1: ignoring informational payload, type INVALID_KEY_INFORMATION
    003 "road" #1: received and ignored informational message
    010 "road" #1: STATE_MAIN_I3: retransmission; will wait 40s for response
    003 "road" #1: ignoring informational payload, type INVALID_KEY_INFORMATION
    003 "road" #1: received and ignored informational message
    003 "road" #1: discarding duplicate packet; already STATE_MAIN_I3
    031 "road" #1: max number of retransmissions (2) reached STATE_MAIN_I3.  Possible authentication failure: no acceptable response to our first encrypted message
    000 "road" #1: starting keying attempt 2 of an unlimited number, but releasing whack

    pc1 is running FC3 with the latest stock kernel.  I'm not sure if I had to patch the kernel to use X.509 certficate authentication.  I never had trouble setting up a windows box for a roadwarrior connection but I have never had to setup a linux ipsec client either.  The error which bothers me is the:

    002 "road" #1: I did not send a certificate because I do not have one.

    Thanks in advance, 

    Tony
  • I decided to start over...

       louie    gateway Cable Modem
    192.168.0.146-----802.11b-----192.168.0.254-----------> Internet

    ASL 5.2:
    Created IPSEC Connection:

    Name: louie
    Type: Roadwarrior
    IPSEC Policy: AES_PFS_COMP
    Auto Packet Filter: On
    Local Endpoint: Internal
    Remote Endpoint: Any
    Local Subnet: None
    Remote Subnet: None
    L2TP Encapsulation: None
    Keys: X.509:louie

    Created CA on ASL box
    Created and signed X.509 DN from CERT/CSR body for:

    louie and gateway

    Imported keys, CA and gateway cert to louie

    modified ipsec.conf file

    version 2

    conn block
        auto=ignore

    conn private
        auto=ignore

    conn private-or-clear
        auto=ignore

    conn clear-or-private
        auto=ignore

    conn clear
        auto=ignore

    conn packetdefault
        auto=ignore

    config setup
            nat_traversal=yes

    # openswan tunnel configuration
    conn road
            left=192.168.0.146
            leftcert=louie.pem
            right=192.168.0.254
            rightcert=gateway.pem
            rightsubnet=0.0.0.0/0
            auto=add



    Restarted ipsec service

    # service ipsec restart

    Start ipsec connection

    # ipsec auto --verbose  --up road
    002 "road" #1: initiating Main Mode
    104 "road" #1: STATE_MAIN_I1: initiate
    003 "road" #1: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03] method set to=108 
    002 "road" #1: enabling possible NAT-traversal with method RFC XXXX (NAT-Traversal)
    002 "road" #1: transition from state STATE_MAIN_I1 to state STATE_MAIN_I2
    106 "road" #1: STATE_MAIN_I2: sent MI2, expecting MR2
    003 "road" #1: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike-02/03: no NAT detected
    002 "road" #1: I am sending my cert
    002 "road" #1: I am sending a certificate request
    002 "road" #1: transition from state STATE_MAIN_I2 to state STATE_MAIN_I3
    108 "road" #1: STATE_MAIN_I3: sent MI3, expecting MR3
    002 "road" #1: Main mode peer ID is ID_DER_ASN1_DN: 'C=us, ST=CA, L=Los Angeles, O=None, OU=None, CN=gateway, E=asd-pix@aol.com'
    002 "road" #1: no crl from issuer "C=us, ST=CA, L=Los Angeles, O=None, OU=None, CN=Los Angeles, E=asd@aol.com" found (strict=no)
    002 "road" #1: transition from state STATE_MAIN_I3 to state STATE_MAIN_I4
    002 "road" #1: ISAKMP SA established
    004 "road" #1: STATE_MAIN_I4: ISAKMP SA established
    002 "road" #2: initiating Quick Mode RSASIG+ENCRYPT+TUNNEL+PFS+UP {using isakmp#1}
    117 "road" #2: STATE_QUICK_I1: initiate
    010 "road" #2: STATE_QUICK_I1: retransmission; will wait 20s for response
    010 "road" #2: STATE_QUICK_I1: retransmission; will wait 40s for response
    031 "road" #2: max number of retransmissions (2) reached STATE_QUICK_I1.  No acceptable response to our first Quick Mode message: perhaps peer likes no proposal
    000 "road" #2: starting keying attempt 2 of an unlimited number, but releasing whack


    Log from gateway/ASL box

    pluto[26541]: "D_louie_0"[2] 192.168.0.146 #2: sent MR3, ISAKMP SA established
    pluto[26541]: "D_louie_0"[2] 192.168.0.146 #2: cannot respond to IPsec SA request because no connection is known for 0.0.0.0/0===192.168.0.254[C=us, ST=CA, L=Los Angeles, O=None, OU=None, CN=gateway, E=asd-pix@aol.com]...192.168.0.146[C=US, ST=Berkshire, L=Newbury, O=My Company Ltd, CN=louie, E=asd@aol.com]
    pluto[26541]: "D_louie_0"[2] 192.168.0.146 #2: sending encrypted notification INCALID_ID_INFORMATION to 192.168.0.146:500
    pluto[26541]: "D_louie_0"[2] 192.168.0.146 #2: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0x203a44fc (perhaps this is a duplicated packet)

    Any help solving this  problem will be greatly appreciated.  


     Tony
Reply
  • I decided to start over...

       louie    gateway Cable Modem
    192.168.0.146-----802.11b-----192.168.0.254-----------> Internet

    ASL 5.2:
    Created IPSEC Connection:

    Name: louie
    Type: Roadwarrior
    IPSEC Policy: AES_PFS_COMP
    Auto Packet Filter: On
    Local Endpoint: Internal
    Remote Endpoint: Any
    Local Subnet: None
    Remote Subnet: None
    L2TP Encapsulation: None
    Keys: X.509:louie

    Created CA on ASL box
    Created and signed X.509 DN from CERT/CSR body for:

    louie and gateway

    Imported keys, CA and gateway cert to louie

    modified ipsec.conf file

    version 2

    conn block
        auto=ignore

    conn private
        auto=ignore

    conn private-or-clear
        auto=ignore

    conn clear-or-private
        auto=ignore

    conn clear
        auto=ignore

    conn packetdefault
        auto=ignore

    config setup
            nat_traversal=yes

    # openswan tunnel configuration
    conn road
            left=192.168.0.146
            leftcert=louie.pem
            right=192.168.0.254
            rightcert=gateway.pem
            rightsubnet=0.0.0.0/0
            auto=add



    Restarted ipsec service

    # service ipsec restart

    Start ipsec connection

    # ipsec auto --verbose  --up road
    002 "road" #1: initiating Main Mode
    104 "road" #1: STATE_MAIN_I1: initiate
    003 "road" #1: received Vendor ID payload [draft-ietf-ipsec-nat-t-ike-03] method set to=108 
    002 "road" #1: enabling possible NAT-traversal with method RFC XXXX (NAT-Traversal)
    002 "road" #1: transition from state STATE_MAIN_I1 to state STATE_MAIN_I2
    106 "road" #1: STATE_MAIN_I2: sent MI2, expecting MR2
    003 "road" #1: NAT-Traversal: Result using draft-ietf-ipsec-nat-t-ike-02/03: no NAT detected
    002 "road" #1: I am sending my cert
    002 "road" #1: I am sending a certificate request
    002 "road" #1: transition from state STATE_MAIN_I2 to state STATE_MAIN_I3
    108 "road" #1: STATE_MAIN_I3: sent MI3, expecting MR3
    002 "road" #1: Main mode peer ID is ID_DER_ASN1_DN: 'C=us, ST=CA, L=Los Angeles, O=None, OU=None, CN=gateway, E=asd-pix@aol.com'
    002 "road" #1: no crl from issuer "C=us, ST=CA, L=Los Angeles, O=None, OU=None, CN=Los Angeles, E=asd@aol.com" found (strict=no)
    002 "road" #1: transition from state STATE_MAIN_I3 to state STATE_MAIN_I4
    002 "road" #1: ISAKMP SA established
    004 "road" #1: STATE_MAIN_I4: ISAKMP SA established
    002 "road" #2: initiating Quick Mode RSASIG+ENCRYPT+TUNNEL+PFS+UP {using isakmp#1}
    117 "road" #2: STATE_QUICK_I1: initiate
    010 "road" #2: STATE_QUICK_I1: retransmission; will wait 20s for response
    010 "road" #2: STATE_QUICK_I1: retransmission; will wait 40s for response
    031 "road" #2: max number of retransmissions (2) reached STATE_QUICK_I1.  No acceptable response to our first Quick Mode message: perhaps peer likes no proposal
    000 "road" #2: starting keying attempt 2 of an unlimited number, but releasing whack


    Log from gateway/ASL box

    pluto[26541]: "D_louie_0"[2] 192.168.0.146 #2: sent MR3, ISAKMP SA established
    pluto[26541]: "D_louie_0"[2] 192.168.0.146 #2: cannot respond to IPsec SA request because no connection is known for 0.0.0.0/0===192.168.0.254[C=us, ST=CA, L=Los Angeles, O=None, OU=None, CN=gateway, E=asd-pix@aol.com]...192.168.0.146[C=US, ST=Berkshire, L=Newbury, O=My Company Ltd, CN=louie, E=asd@aol.com]
    pluto[26541]: "D_louie_0"[2] 192.168.0.146 #2: sending encrypted notification INCALID_ID_INFORMATION to 192.168.0.146:500
    pluto[26541]: "D_louie_0"[2] 192.168.0.146 #2: Quick Mode I1 message is unacceptable because it uses a previously used Message ID 0x203a44fc (perhaps this is a duplicated packet)

    Any help solving this  problem will be greatly appreciated.  


     Tony
Children
  • I upgraded to version 6, and resumed this project...

     - Here is the ASL IPSEC config made from the web interface - 

    Name: louie
    Type: Roadwarrior
    IPSEC Policy: AES_PFS  (do not select AES_PFS_COMP - compression)
    Auto Packet Filter: On
    Local Endpoint: Internal
    Remote Endpoint: Any
    Local Subnet: None
    Remote Subnet: None
    L2TP Encapsulation: None
    Keys: X.509:louie

     - Created CA on ASL box -

    Created and signed X.509 (VPN id email address) from CERT/CSR body for:

    louie and gateway

    Imported keys, CA and gateway cert to louie

    The louie and gateway certs were placed in the /etc/ipsec.d/certs folder, the louie private key was placed into the /etc/ipsec.d/private folder, and the CA cert was placed in the /etc/ipsec.d/cacerts folder.

     - Created a packet filter rule -

    louie(IPsec key) --> Any --> Any

     - modified ipsec.conf file -
    for some reason when I post this, the tabs/indentations from this file are not displayed.

    version 2

    config setup
            interfaces=%defaultroute
            nat_traversal=yes

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

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

    conn roadwarrior
            left=%defaultroute
            leftcert=CERT_louie.pem
            leftid=louie@home.local
            right=192.168.0.254
            rightcert=CERT_gateway.pem
            rightid=gw@home.local
            auto=add
            pfs=yes

    conn block
            auto=ignore

    conn private
            auto=ignore

    conn private-or-clear
            auto=ignore

    conn clear-or-private
            auto=ignore

    conn clear
            auto=ignore

    conn packetdefault
            auto=ignore


     - /etc/ipsec.secrets - 

    the x's & o's represent the keys generated from the command:

    ipsec rsasigkey --verbose 1024 > /tmp/keys.tmp

    Here's my ipsec.secrets file, minus the actual keys:

    #include /etc/ipsec.d/*.secrets
    : RSA {
    # RSA 1024 bits   louie.home.local   Sun Aug 28 19:46:45 2005
    # for signatures only, UNSAFE FOR ENCRYPTION
    #pubkey=xoxoxoxoxoxoxoxoxoxox==
    Modulus: xoxoxoxoxoxox
    PublicExponent: 0x0x
    # everything after this point is secret
    PrivateExponent: xoxoxoxox
    Prime1: xoxoxoxo
    Prime2: xoxoxoxo
    Exponent1: xoxoxoxo
    Exponent2: xoxoxoxo
    Coefficient: xoxoxoxo

    }

    : RSA KEY_louie.pem "passphrasehere"

    Don't forget the carriage return after the last ".

    -I receive indications from the ASL IPSec screen (two green indicators) indicating the IPSec connection is up and running.  I was able to surf the internet without problems.  If I had another wireless card, I could sniff the traffic to determine if the connection is truly working, but I'm assuming it is.

    My next step is to filter all traffic other than IPSec/IKE/ESP originating from my laptop from the access point.  I have not quite figured out how to write this rule, but I'll get on it when I get more time.  The other option was to make all internal traffic IPSec/VPN.

    I know how frustrating this was, but hopefully this will get smarter people involved to improve on what I did.  I applied this to a WLAN connection, but it should be the same for a wired connection.  Good Luck!


    Tony