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
  • Thank you, Björn. I would like to see the script or part of it..  you could send it to me privately on this board if you don't want to publish it.

    I have built an Amazon Linux router several months ago, and the whole NAT thing was no issue at all. I just had to use the LEFTID setting in OpenSWAN (and MYID) and everything worked without a problem. Astaro's GUI does not let you adjust those settings. I think I will maybe hack it for this instance and see if the issue goes away.

    The other thing Astaro is not handling well, is if the remote side is behind a NAT. I believe that is because of another config setting it does not expose which is I think called RIGHTID which you'd set to %ANY%. Because of this, I have to put in the private IP in the VPNID field of a remote gateway's setup. I have a Cisco router that I'm hoping to replace with Astaro instances, and it handles all of this stuff fine. Fortunately I will be migrating to non-NAT'ed VMware infrastructure with the Astaro's, but still can't do anything about some of my peers which are behind NAT's.
Reply
  • Thank you, Björn. I would like to see the script or part of it..  you could send it to me privately on this board if you don't want to publish it.

    I have built an Amazon Linux router several months ago, and the whole NAT thing was no issue at all. I just had to use the LEFTID setting in OpenSWAN (and MYID) and everything worked without a problem. Astaro's GUI does not let you adjust those settings. I think I will maybe hack it for this instance and see if the issue goes away.

    The other thing Astaro is not handling well, is if the remote side is behind a NAT. I believe that is because of another config setting it does not expose which is I think called RIGHTID which you'd set to %ANY%. Because of this, I have to put in the private IP in the VPNID field of a remote gateway's setup. I have a Cisco router that I'm hoping to replace with Astaro instances, and it handles all of this stuff fine. Fortunately I will be migrating to non-NAT'ed VMware infrastructure with the Astaro's, but still can't do anything about some of my peers which are behind NAT's.
Children
  • Thank you, Björn. I would like to see the script or part of it..  you could send it to me privately on this board if you don't want to publish it.

    Hi coewar,

    I attached my script to this reply, rename it as you like and run chown and chmod +x on it. You can find some comments inside to setup it for you needs. There are some options for sending emails and log to syslog too. If you have questions...

    I have built an Amazon Linux router several months ago, and the whole NAT thing was no issue at all. I just had to use the LEFTID setting in OpenSWAN (and MYID) and everything worked without a problem. Astaro's GUI does not let you adjust those settings. I think I will maybe hack it for this instance and see if the issue goes away.

    The other thing Astaro is not handling well, is if the remote side is behind a NAT. I believe that is because of another config setting it does not expose which is I think called RIGHTID which you'd set to %ANY%. Because of this, I have to put in the private IP in the VPNID field of a remote gateway's setup. I have a Cisco router that I'm hoping to replace with Astaro instances, and it handles all of this stuff fine. Fortunately I will be migrating to non-NAT'ed VMware infrastructure with the Astaro's, but still can't do anything about some of my peers which are behind NAT's.


    As I understand that, the use of %ANY% is for roadwarrior setups, not for site-to-site VPNs. 

    Regards