Skip to content

Commit

Permalink
Update adding/removing servers
Browse files Browse the repository at this point in the history
  • Loading branch information
jwsi committed Apr 26, 2020
1 parent 4c7607e commit 3018b1f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/servers/adding-servers.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Adding VPN Servers
==================

It is possible to add servers whilst the ``uh-vpn-server`` service is running. To do so, one must update
It is possible to add servers whilst the uh-vpn-server service is running. To do so, one must update
the token store in ``/etc/uh-vpn-server``.

First, an API token for the relevant server must be obtained from the `website`_. Once this is done, it is
Expand All @@ -20,6 +20,11 @@ This will bring up an editor prompt like so:
In this example, the token (``0123456...``) has been appended to the file. Once this is done,
save the file and exit the editor (Ctrl-X in nano).

.. note::
It is possible to add as many tokens as you wish to this store in order to run multiple
VPN servers at once. However, one must ensure that servers don't share the same socket
(port + protocol) or the same tunnel network if running on the same machine.

It is possible to confirm the acceptance of a new token by viewing the last few lines of output
from the ``uh-vpn-server`` service daemon:

Expand All @@ -28,7 +33,7 @@ from the ``uh-vpn-server`` service daemon:
$> tail /var/log/uh-vpn-server/daemon.log
The last few lines of this output should acknowledge the new token and confirm that the associated
configuration has been download and installed:
configuration has been downloaded and installed:

.. image:: /_static/servers/token_acceptance.png
:width: 600
Expand Down
39 changes: 39 additions & 0 deletions source/servers/removing-servers.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
Removing Servers
================

Removing servers cannot be done whilst the uh-vpn-server service is running. The service needs to be stopped, then
the associated token removed from the token store in ``/etc/uh-vpn-server/tokens`` and then the service needs to be
restarted.

This operation has the side effect of halting all VPN servers configured on the host machine.

.. code-block:: bash
$> sudo service uh-vpn-server stop
Now, the associated token needs to be removed from the token store:

.. code-block:: bash
$> sudo nano /etc/uh-vpn-server/tokens
This will bring up an editor prompt like so:

.. image:: /_static/servers/token_store.png
:width: 600
:alt: Token store

Remove the token and save the file (Ctrl-X in nano). The service can then be restarted by issuing the command:

.. code-block:: bash
$> sudo service uh-vpn-server start
One should then check that the service is up and running:

.. code-block:: bash
$> sudo service uh-vpn-server status
The output should say **active (running)** as depicted below:

.. image:: /_static/servers/service_status.png
:width: 600
:alt: Expected status

0 comments on commit 3018b1f

Please sign in to comment.