summaryrefslogtreecommitdiff
path: root/pages/docs/platform/services/openvpn.md
blob: 32ee2ac5c4f163733449d2abcd4697f816a7bd06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@title = 'openvpn'
@summary = "OpenVPN egress gateways"

Topology
------------------

Currently, `openvpn` service should not be combined with other services on the same node.

Unlike most of the other node types, the `openvpn` nodes do not need access to the database and does not ever communicate with any other nodes (except for the `monitor` node, if used). So, `openvpn` nodes can be placed anywhere without regard to the other nodes.

Configuration
---------------------

*Essential configuration*

* `ip_address`: The main IP of the server, and the egress address for outgoing traffic.
* `openvpn.gateway_address`: A secondary address on the same machine (sharing the same interface, or on a separate interface). The OpenVPN daemon is bound to this address and VPN clients connect to it.

For example:

    {
      "ip_address": "1.1.1.1",
      "openvpn": {
        "gateway_address": "2.2.2.2"
      }
    }

In this example, VPN clients will connect to 2.2.2.2, but their traffic will appear to come from 1.1.1.1.

Why are two IP addresses needed? Without this, traffic between two VPN users on the same gateway will not get encrypted. This is because the VPN on every client must be configured to allow cleartext traffic for the IP address that is the VPN gateway.

*Optional configuration*

Here is the default configuration:

    "openvpn": {
      "configuration": {
        "auth": "SHA1",
        "cipher": "AES-128-CBC",
        "fragment": 1400,
        "keepalive": "10 30",
        "tls-cipher": "DHE-RSA-AES128-SHA",
        "tun-ipv6": true
      },
      "ports": ["80", "443", "53", "1194"],
      "protocols": ["tcp", "udp"]
    }

You may want to change the ports so that only 443 or 80 are used. It is probably best to not modify the `openvpn.configuration` options for now.