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

SSL site to site vpn against standard openvpn

Hi guys,

we're moving our vpn server to astaro, using ssl vpn (currently we use openvpn on standard linux box).
All these vpn are site-to-site with customer which have linux gateways.

The question is: how can I convert the .apc to a conf usable by a standard openvpn ?
We cannot force everyone to use asg [:)]

Looking into the file seems to have CA cert, client crt and client key.
It should be easy to get them,but maybe there's a more "official" way to do that?

regards,
matteo.


This thread was automatically locked due to age.
  • There are several threads here describing what you have to do.

    One way is to manually copy the files from /var/chroot-openvpn/etc/openvpn/***x to the new location.
    However, it´s not a plug&play way, you really have to know what you are doing. If you prefer the plug&play variant, migrate all your VPN gateways to ASG.
  • mmmh I think that copying what you say will not make anything work, since all the cert stuff is missing in those dirs.

    also I see that asg sets a random username/pass on the .apc file, which are
    needed for the remote openvpn.

    migrating all peer to openvpn is a no-go, since you cannot force another company to buy asg and migrate they gw to asg [:)]

    so... how can we extract key/cert/ca and user+pass from apc file ?
    i did not found anything on forum...
  • yes and no.

    The trick is this:
    1) configure the ASG as a SSL VPN _server_
    2) download the .apc file from the ASG
    3) setup a "experimental" ASG. This can be for example a asg runnning under vmware. It doesn´t have to do anything productiv. You can destroy this experimental ASG again afterwards
    4) configure a new site2site ssl vpn _client_ connection on the experimental ASG. 
    5) import the .apc file into the experimantal ASG and activate the connection (green light)
    5) on the experimental ASG, under /var/chroot-openvpn/etc/openvpn/client/REF_****** all necessary files (ca-cert, user-cert, static username/password and .ovpn-config file) for the client are located
    6) use these files to setup your non-ASG openvpn client connection
    7) throw away the experimental ASG or alternatively send it to me!  :-)

    It _might_ work that you import the .apc file on the SAME ASG as where you did the export (thus avoiding setting up the experimental ASG). 
    However, I made the experience that this works sometimes, sometimes you must enable/disable the client connection 2 or 3 times, sometimes it doesn´t work at all. Also, when creating the client ssl connection and importing the .apc file, ensure you have _deactivated_ (red light) the appropriate server connection. After having extracted the files on command line, first disable (red light) the client connection, then delete the client connection and re-enable the server connection.
  • thanks!

    but i solved also looking into the file with an hex editor [:D]
  • Hi Guys,

    DD-WRT "Mega" Versiond does have OpenVPN Client on the router.

    So does that mean we can do SSL VPN from it to Astaro?

    I know it is not as simple reading what you guys did but at least have someone confirm it can be done is a good start.
  • sure it can be done.

    I've moved our main gateway to ASG, acting as opnvpn server and mantained all others openvpn clients as before to do site-to-site vpns.

    the steps are roughly these one:

    •  setup astaro site-to-site ssl vpn
    •  download apc file, not encrypted
    •  hexdump -C filename.apc : looking to it you can get username & password
    •  cat filename.apc : cut & paste the certs. they appear in this order:
      * client.crt
      * ca.crt
      * client.key
      * (cut & paste can be done looking to the cert boundaries)
    •  setup your openvpn client. basically you need to setup auth (by default on asg SHA1) cipher (by default AES-128-CBC), point it to new ca/cert/key and add auth-user-pass.
      * you can also generate a roadwarrior ssl access and download the conf from ASG user portal for linux. then change the certs/ca/key with the one you got from apc file.
    •  start openssl on the client, it will prompt with username & pass: use the one you got from the hexdump
    •  openvpn allows to setup auth-user-pass param with a filename, for example auth-user-pass /etc/supersecret and the put into /etc/supersecret the username & pass for ASG. so you can start it automatically.
      * on fedora/centos the openvpn client must be recompiled to enable the auth-user-pass file function, on ubuntu is already in


    That's basically all.
    Ok is not for faint of heart, but it works [:)]

    And I hope ASG will soon support to download the conf directly in openvpn format [:D]
  • And I hope ASG will soon support to download the conf directly in openvpn format [:D]


    Pretty sure they won´t do that, as the support issues would increase. For people who have the need to make a VPN between a nonASG to an ASG  box, there is already a solution (IPSec), so there is no need and no reason for Astaro to provide a second, inter-vendor VPN solution for free.
  • Sorry but I don't agree, for two reasons:

    1) ipsec is a pain to make it work if you have dinamic ip, nat, restricted firewalls and so on... that why openvpn was invented [[:)]]

    2) openvpn is a free solution, so why don't make it interoperable ? asg already has configs for linux as roadwarrior, why not site-to-site ?

    openvpn is free, astaro is a superb interface to it.
    asg can offer both solution... download the ready to go apc file or the zip for openvpn client.

    also commercially, then can fully support only ssl site-to-site with 2 asg boxes and restricted support for standard openvpn clients...

    I don't see it as a problem, even for support.

    my opinion is that if you use standard (open) solution, you must be interoperable.
    If some customer does not want to learn a specific tool (in this case openvon), they'll put many asg boxes and use apc files.
    Customers with already deployed solution, will not harass support since they know what they're doing already, so can use and understand standard openvpn configs [[:)]]

    jm2c
  • hy,

    I was running into the same problem. I must connect my astaro via site-to-site to an "normal" already running openvpn system as client. Without an .apc it is not possible. The Support said that there is no offical way for converting, and "normal" openvpn is not supported.

    The bash script from:

    https://community.sophos.com/products/unified-threat-management/astaroorg/f/95/t/67045

    seams broken on my bash.

    So I make a feature request on:

    SSL VPN: Convert .ovpn to .apc/.epc

    Feel free to vote for it.
  • Hi,

    you could also (by bypassing the webinterface and voiding your warranty) try to use the OpenVPN files >inside