This article describes how you can use Netmodule Routers with LXC container virtualisation to connect unsecure http devices through an OpenVPN infrastructure and securly expose them to the internet. It can also be used if you do provide the network environment for a customer of yours and you want him to be able to access his devices, but you still manage the routers yourself.
{{:app-notes:traefik_ovpn_concept.jpg|}}
The above shows the basic concept of such an infrastructure. In the end you want to be able to reach your unsecure HTTP Endpoints (industrial facilities, measurement devices, webcams et cetera) through the internet on a secure basis. Your routers will be part of a secured OpenVPN network and from the internets point of view requests get in and out of your environment through https. Once they reach the container they get forwarded as http requests, but through your secured network to the acutal endpoint. This environment can be setup combining OpenVPN and a service called [[https://traefik.io|traefik]] (a reverse proxy) which will run in the container taking care of re-writing your https-to-http traffic as well as certificates.
* Netmodule Router running software version >= 4.0.0.100 with a virtualisation licence
* Running LXC virtualisation environment [[virtualisation:start|described here]]
* ARM based linux distribution of your flavor from [[https://jenkins.linuxcontainers.org/view/Images/|linuxcontainers.org]], to make it small the example is based on [[https://alpinelinux.org/|Alpine Linux]]
* The [[https://traefik.io|traefik.io]] reverse proxy for the ARM Platform
* As an alternativ you can download a ready to use container [[https://share.netmodule.com/router/public/virt/alpine_3.7_traefik.tar.xz|HERE]]
* OpenVPN network setup (your container could also run on one of your openvpn clients)
* Clients need fix IP adresses so you can add them later to traefik
* Valid DNS record(s) pointing to the public IP of the network where traefik runs
* Wildcards DNS record preferred otherwise you need to create individual subdomains for each endpoint
Setting up traefik is fairly simple. The main concept of how the service works is shown in the following graphic:
{{:app-notes:traefik_revproxy_internal.png|}}
(image taken from traefik.io)