Guest User!

You are not Sophos Staff.

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

Site-to-Site IPSec VPN between Astaro and Openswan (routing, parameters)

Hello @all,

I'm trying to create a Site-to-Site VPN between an Astaro Security Gateway (v8.301) and openswan (2.6.28 on ubuntu server). Auth is handled through RSA-Keys on both sides. Currently I'm able to establish the IPSec tunnel without errors (STATE_QUICK_R2: IPSec SA established tunnel mode {..para..}), but I can't send packets over the connection in any direction. 

This is my setup:
Site-to-site between 10.10.10.0/24 (office) and 192.168.100.0/24 (branch)

10.10.10.0/24===10.10.10.1office.dyn.ip---{internet}---branch.dyn.ip192.168.100.1===192.168.100.10192.168.100.0/24

Openswan is located behind a NAT-Router. Because the fact that everything is fine with IPSec (IKE, ESP, SA, RSA-Pubkeys) itself I assume that the problem don't relate to this parameters. No, I'm sure I made something wrong related to the routing. 

So without any specific configuration files, just to understand the topic and for qualified bug hunting:

What do I have to put inside openswan config (local=left and remote=right) for left and right, especially behind a NAT-Router? My current settings:
left="192.168.100.10"
leftnexthop=%defaultroute
leftsourceip="192.168.178.10"
leftsubnet="192.168.178.0/24"
right="office.dyn.ip"
rightsourceip="10.10.10.1"
#rightnexthop=%defaultroute
rightsubnet="10.10.10.0/24"

My current routing table on openswan server:
[FONT="Courier New"]root@openswan:~# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.100.1   0.0.0.0         UG        0 0          0 eth0
10.10.10.0     192.168.100.1   255.255.255.0   UG        0 0          0 eth0
192.168.100.0   0.0.0.0         255.255.255.0   U         0 0          0 eth0[/FONT]

Shouldn't 10.10.10.0 point to the gateway 192.168.100.10, because the tunnel starts/ends here? 

[FONT="Courier New"]root@openswan:~# ip xfrm policy show
src 192.168.100.0/24 dst 10.10.10.0/24 
dir out priority 2344 
tmpl src 192.168.100.10 dst 1.1.1.1(


This thread was automatically locked due to age.
Parents
  • Hi, Björn, and welcome to the User BB!

    IPsec can be picky about NAT.  In the Astaro 'Remote Gateway' definition for the branch, set 'VPN ID: IP Address' and 'VPN ID (Optional): 192.168.100.10'.

    I haven't read your post very closely - I'm just hoping I can avoid it with a lucky guess! [;)]

    Cheers - Bob
  • Hi, Björn, and welcome to the User BB!

    IPsec can be picky about NAT.  In the Astaro 'Remote Gateway' definition for the branch, set 'VPN ID: IP Address' and 'VPN ID (Optional): 192.168.100.10'.

    I haven't read your post very closely - I'm just hoping I can avoid it with a lucky guess! [;)]

    Cheers - Bob


    Hi Bob,
    thanks for helping. Site-to-Site without NAT is so much easier... anyway

    I changed the Identifier in the Remote Gateway definition to IP. Now I'm getting various errors, a progress [[:)]]

    Astaro:
    "Informational Exchange message must be encrypted"
    "sending encrypted notification INVALID_KEY_INFORMATION"

    Openswan:
    "ignoring informational payload, type INVALID_KEY_INFORMATION msgid=00000000"
    "sending notification PAYLOAD_MALFORMED"

    ISAKMP seems to be up and there is something wrong with esp/crypto now. 
    STATE_MAIN_R3: sent MR3, ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=aes_256 prf=OAKLEY_SHA2_256 group=modp1536}

    Guess I have to digg again, I will post updates (and questions [[:)]]

    Cheers, Björn
Reply
  • Hi, Björn, and welcome to the User BB!

    IPsec can be picky about NAT.  In the Astaro 'Remote Gateway' definition for the branch, set 'VPN ID: IP Address' and 'VPN ID (Optional): 192.168.100.10'.

    I haven't read your post very closely - I'm just hoping I can avoid it with a lucky guess! [;)]

    Cheers - Bob


    Hi Bob,
    thanks for helping. Site-to-Site without NAT is so much easier... anyway

    I changed the Identifier in the Remote Gateway definition to IP. Now I'm getting various errors, a progress [[:)]]

    Astaro:
    "Informational Exchange message must be encrypted"
    "sending encrypted notification INVALID_KEY_INFORMATION"

    Openswan:
    "ignoring informational payload, type INVALID_KEY_INFORMATION msgid=00000000"
    "sending notification PAYLOAD_MALFORMED"

    ISAKMP seems to be up and there is something wrong with esp/crypto now. 
    STATE_MAIN_R3: sent MR3, ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=aes_256 prf=OAKLEY_SHA2_256 group=modp1536}

    Guess I have to digg again, I will post updates (and questions [[:)]]

    Cheers, Björn
Children
  • Hi,

    Meanwhile I got the tunnel with the Gateway Identifier IP up and running again. But sadly I can't send any data over it in any direction.

    I see the connection as NAT-T on my Astaro.
    [FONT="Courier New"]root@astaro : ip xfrm state
    src 1.1.1.1 dst 2.2.2.2
    proto esp spi 0xe506d652 reqid 16485 mode tunnel
    replay-window 32 flag noecn nopmtudisc af-unspec
    auth hmac(sha256) 0xb63698da9bb68bc9b7d60831a49363ae2d43e203dd8a1b08de32a581c97b7262
    enc cbc(aes) 0xcde28bd947cffee7a1750b37a8248a2bb00440bbcb135d883b414d17fe2d050a
    encap type espinudp sport 4500 dport 4500 addr 0.0.0.0[/FONT]

    ... and on openswan

    [FONT="Courier New"]root@astaro : ip xfrm state
    src 192.168.100.10 dst 1.1.1.1
    proto esp spi 0xe82e6f22 reqid 16385 mode tunnel
    replay-window 32 flag af-unspec
    auth-trunc hmac(sha256) 0x3ea6dc9cad4700bad088b7e4a44d2c0939ba6ddb3e423675366eb6641d6c413e 96
    enc cbc(aes) 0xfe466f7d7faf2c9db24657feca18a24a40fb16bb6bb50a335a8f780af6a1159b
    encap type espinudp sport 4500 dport 4500 addr 0.0.0.0[/FONT]

    1.1.1.1 is the external IP of the Astaro
    2.2.2.2 is the external IP of the NAT-Router

    I don't get the point, it should work...

    Is there anything I forgot?

    Björn