Connecting a Linux VPN client (headless, no GUI)

Christopher Dakin

This article details installing and connecting from a headless Linux system to the LogonBox VPN.

This can also be performed on a Linux system with a GUI, from a terminal shell.

This article will detail installing onto a Debian system.

 

1. Generating the configuration file

Navigate to https://<logonboxserver> in a web browser and log on with your created user into the User Portal.

 

You should be presented with the User Setup page which should guide you through the setup.

Note: this page can take 10-20 seconds to load as it is currently generating your VPN config files for you.

In section 2, click the Download Configuration button to save the required .conf file.

 

2. Installing and configuring the WireGuard client

First install the WireGuard client with:

apt install wireguard

 

Using an SFTP client, upload your configuration file to your Linux system.

copy the file to /etc/wireguard and rename to wg0.conf

e.g.

copy ~/debian-on-system.wg.conf /etc/wireguard/wg0.conf

 

3. Connecting the client

You can now connect the client with:

wg-quick up wg0

 

You can now route into the network successfully.

To stop the VPN connection, run

wg-quick down wg0

 

4. Troubleshooting

When installing on Debian 9 or higher you may get the following errors when starting the VPN connection

 

/usr/bin/wg-quick: line 32: resolvconf: command not found

If this occure, the fix is to create a symlink to the resolvconf file:

ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf

 

You may then get the following error: Failed to set DNS configuration: Unit dbus-org.freedesktop.resolve1.service not found.

If this happens you need to enable the resolved service with:

systemctl enable systemd-resolved.service