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.
Parents
  • 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
Reply
  • 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
Children
  • 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
  • It's pretty easy to configure any openVPN client als Site-to-Site client and connect it with an Astaro server.

    As someone stated before you can do it this way:

    You need one ASG or ASL configured as a SSL VPN Server as you wish.
    Then you need another ASG or ASL / Virtual Aplliance for reading the client config from.

    1. You download the client configuration from the server connection
    2. on the 2nd Astaro you configure the client endpoint by uploading the config file.
    3. Make sure the tunnel is up and functional (green status).
    4. Enable shell access for loginuser -> SSH into client Astaro -> "sudo -s" (don't passwd root!!).
    5. cd /var/sec/chroot-openvpn/client/"NAMEOFYOURCONNECTION"/
    6. "ls -al" shows you all the files you need for your openvpn-client.
    -> Option a: scp these files to any backup location.
    -> Option b: open every file with vim and copy it's contents and paste into a new file exactly matching the name
    7. Now copy these files to any machine running openvpn and rename (only) the config file to smthg. like config.conf so it can be recognized as an openVPN configuration by openVPN. openVPN will look for a configuration in /etc/openvpn by default, so put it somewhere there so that openVPN is automatically started and configured with every disconnect or system reboot.
    8. The forelast step is to vim the config.conf and check where it is looking for the cert, key and auth files. You may change the path entries to the new location of the files or you put all the files except the .conf where they are searched for.

    I'm not sure if this is neccessary at all but I created a tunnel interface manually by typing "openvpn --mktun --dev tun". If at all you only have to do this once as this interface is persistant.


    That's it. You can check if it worked by looking for the tun0 adapter when doing ifconfig.

    Don't forget to shutdown the 2nd Astaro you ripped the config off. If everything is working the status of the VPN will be green on the server astaro.

    If you have any problems you will fix them by checking the daemon.log on the client (you may adjust logging level in the client config.conf) and the live log on the astaro.

    If Astaro don't want us to do this they should just encrypt the configurations. Everything is plain text..you could even open the config you downloaded from the frist astaro with any editor in hex mode und if you know what belongs where you're fine.