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

UTM as VPN "Client"

Hey Guys!

I recently signed up for a VPN service. I want to have all the traffic from the device to go through the tunnel The service has .ovpn config files, as well as all the info I could need to set up a VPN connection, which I have downloaded. Now I have a bunch of .ovpn config files which are utterly useless.

On a side note, the #1 VPN feature request is something to convert the .ovpn to the (seemingly) proprietary .apc (or .epc) files:
UTM (Formerly ASG) Feature Requests: VPN (172 ideas)

There are a few posts indicating a script may be able to do so. I have downloaded it and run it. It never coimpletes properly, and the .apc file it spits out is always corrupted (or so say Sophos when I try to import it).

Now, I tried creating an SSL VPN Server, save the config file, and then tried to edit it; I couldn't seem to get it top open to be edited... If this is possible, please let me know how.

So... How do I set up this UTM to be an Open VPN client to another server whose settings I have no control over? All the Sophos guides I could find only mentioned creating the VPN server on one device, saving the config file, and using THAT on the "client" device. How can I just config the client device?

Is this even possible with the UTM 9 devices?


This thread was automatically locked due to age.
Parents
  • ...Sophos has made many customizations to the backend, such as with many conf files.  In a normal *nix distro, you would edit the .conf to make a change.  Well, UTM has a configuration database called confd, which stores many settings and writes then into conf files, so as changes are made to the configuration, they are written out to conf files, obliterating any custom changes you may make in the conf files directly, sometimes within seconds.  The temporary way around this is to make changes into the relevant conf-default files instead.  I say temporary because when u2d patches are installed, for a given portion of the UTM, all files for that section will be overwritten.  So, if you want to stay current with patches/updates, potentially once a month you'll be resetting those custom changes and needing to diff the backup conf-default with the new patched one in case something has been altered to fix an issue.

    Thanks! =]  That explains a lot, especially why openvpn confs are created dynamically and subsequently deleted when the vpn profile is disabled.

    Would I be correct in assuming then since Sophos doesn't want OS files modified via the cli (completely understandable why they don't, for a myriad of reasons), there's no literature or write ups on how one would go about modifying specific database files run by confd?  My thought process is if circumventing certain lines of code isn't practical due to confd, could one simply circumvent entire files by running openvpn from static files?  Instead of utilizing the /var/mdw/scripts/openvpn script, could a custom script be utilized to call and run openvpn (for example, customizing one from a linux distro, or the distro UTM is based on if confd isn't utilized on it [I'm referring to the option during installation where it asks if you want to install enterprise features or refuse and get a basic Linux distro]) 

    [SIZE="1"]**DISCLAIMER: Making any changes via the command line interface [cli] results in the loss of support and warranty for paid licensees**[/SIZE]
  • So... I DID manage to email Sophos and ask them about this.

    In the end, Sophos does NOT support setting up the Gateway as an OpenVPN Client, at all (regardless of support level); such functionality does not exist. Sophos support suggested that create a feature request for such a...feature.

    Comically enough, one such featuyre request does indeed already exist. In fasct, it is THE #1 requested feature (by a VERY wide margin):
    UTM (Formerly ASG) Feature Requests: VPN (173 ideas)

    Given that the request was first created over 5 YEARS ago and does not appear to have had any response or comment from Sophos, I would not (and do not) expect anything from them anytime at all.

    So, that means it's up to us to break the (non-existant) warrantee and hack that functionality.

    From my knowledge of OpenVPN, assuming Sophos is using a fairly generic implementation of the OpenVPN binaries (it would theoretically be possible that they have removed the code for client functionality entirely), all we would need to do is just use a proper config file, point to the proper certs, and away you go.

    And even if they DID remove the client functionality, since the base OS is Linux based, all we would need to do is find the right kind of binaries (and possible prerequisites) and use that, along with configs and certs, and set up a script to do the connecting and monitoring... This couldn't be monitored through the WebUI, but SHOULD be do-able...
  • So... I DID manage to email Sophos and ask them about this.

    In the end, Sophos does NOT support setting up the Gateway as an OpenVPN Client, at all (regardless of support level); such functionality does not exist. Sophos support suggested that create a feature request for such a...feature.

    Comically enough, one such featuyre request does indeed already exist. In fasct, it is THE #1 requested feature (by a VERY wide margin):
    UTM (Formerly ASG) Feature Requests: VPN (173 ideas)

    Given that the request was first created over 5 YEARS ago and does not appear to have had any response or comment from Sophos, I would not (and do not) expect anything from them anytime at all.

    So, that means it's up to us to break the (non-existant) warrantee and hack that functionality.

    From my knowledge of OpenVPN, assuming Sophos is using a fairly generic implementation of the OpenVPN binaries (it would theoretically be possible that they have removed the code for client functionality entirely), all we would need to do is just use a proper config file, point to the proper certs, and away you go.

    And even if they DID remove the client functionality, since the base OS is Linux based, all we would need to do is find the right kind of binaries (and possible prerequisites) and use that, along with configs and certs, and set up a script to do the connecting and monitoring... This couldn't be monitored through the WebUI, but SHOULD be do-able...

    I haven't had the time yet to thoroughly look at the Sophos config files, however if you haven't yet, read Scott's last reply.  Sophos uses confd to create and adjust conf files on the fly, which is why the openvpn config files are created dynamically and subsequently deleted.

    In theory, your thought process should work, however I'm wondering if simply compiling a second openvpn installation onto Sophos would be simpler, otherwise we have to work with confd, something I have no experience with.  When I have time, I'm going to install UTM in a virtual machine and decline the option to enable enterprise features thereby leaving just the linux base OS that Sophos is built upon to see if I can get a better idea of what may work
  • II'm going to install UTM in a virtual machine and decline the option to enable enterprise features
    Hi James, I wouldn't do something that drastic. Think of confd as a second system admin, backend to webadmin if you will. Its only job is to make the system look exactly the way it looks in webadmin; from licensing, networks, iptables... everything. This makes confd your friend majority of the time since you can click a few things and confd will do the heavy lifting so you don't have to look under the hood.

    But as you have noticed, it comes at a price that if you change something manually, confd thinks something went wrong and fixes it back to the way it looks in webadmin.

    Luckily, confd is only aware of the files already existing in the UTM so you can technically add complete working directories with new binaries and confd isn't bothered. So for testing purposes, if you can get a binary to install on UTM, you will be fine. 

    From your WIKI contribution, the only catch would be finding a way to add the network without confd removing it randomly. Once you have the network added successfully, you probably can add firewall rules via webadmin to move traffic through that tunnel if you so desire.

    By the way https://www.softether.org/ is an interesting open source vpn project that I have been playing with recently.
Reply
  • II'm going to install UTM in a virtual machine and decline the option to enable enterprise features
    Hi James, I wouldn't do something that drastic. Think of confd as a second system admin, backend to webadmin if you will. Its only job is to make the system look exactly the way it looks in webadmin; from licensing, networks, iptables... everything. This makes confd your friend majority of the time since you can click a few things and confd will do the heavy lifting so you don't have to look under the hood.

    But as you have noticed, it comes at a price that if you change something manually, confd thinks something went wrong and fixes it back to the way it looks in webadmin.

    Luckily, confd is only aware of the files already existing in the UTM so you can technically add complete working directories with new binaries and confd isn't bothered. So for testing purposes, if you can get a binary to install on UTM, you will be fine. 

    From your WIKI contribution, the only catch would be finding a way to add the network without confd removing it randomly. Once you have the network added successfully, you probably can add firewall rules via webadmin to move traffic through that tunnel if you so desire.

    By the way https://www.softether.org/ is an interesting open source vpn project that I have been playing with recently.
Children
No Data