2019-05-17 12:49:29 +00:00
# Using Ubuntu as a Client with WireGuard
2018-08-28 14:25:40 +00:00
## Install WireGuard
2019-05-17 12:49:29 +00:00
To connect to your AlgoVPN using [WireGuard ](https://www.wireguard.com ) from Ubuntu, first install WireGuard:
2018-08-28 14:25:40 +00:00
2018-09-02 19:22:24 +00:00
```shell
2019-11-27 06:45:27 +00:00
# Ubuntu 19.04 and earlier:
# Add the WireGuard repository
2018-08-28 14:25:40 +00:00
sudo add-apt-repository ppa:wireguard/wireguard
2018-09-02 19:22:24 +00:00
2019-11-27 06:45:27 +00:00
# Ubuntu 17.10 and earlier:
# Update the list of available packages
2019-05-17 12:49:29 +00:00
sudo apt update
2018-09-02 19:22:24 +00:00
2018-08-28 14:25:40 +00:00
# Install the tools and kernel module:
2019-05-17 12:49:29 +00:00
sudo apt install wireguard openresolv
2018-08-28 14:25:40 +00:00
```
2019-04-26 04:56:38 +00:00
For installation on other Linux distributions, see the [Installation ](https://www.wireguard.com/install/ ) page on the WireGuard site.
2018-08-28 14:25:40 +00:00
## Locate the Config File
2019-04-26 04:56:38 +00:00
The Algo-generated config files for WireGuard are named `configs/<ip_address>/wireguard/<username>.conf` on the system where you ran `./algo` . One file was generated for each of the users you added to `config.cfg` . Each WireGuard client you connect to your AlgoVPN must use a different config file. Choose one of these files and copy it to your Linux client.
2018-08-28 14:25:40 +00:00
## Configure WireGuard
Finally, install the config file on your client as `/etc/wireguard/wg0.conf` and start WireGuard:
2018-09-02 19:22:24 +00:00
```shell
2018-08-28 14:25:40 +00:00
# Install the config file to the WireGuard configuration directory on your
2019-04-26 04:56:38 +00:00
# Linux client:
2018-08-28 14:25:40 +00:00
sudo install -o root -g root -m 600 < username > .conf /etc/wireguard/wg0.conf
2018-09-02 19:22:24 +00:00
2018-08-28 14:25:40 +00:00
# Start the WireGuard VPN:
sudo systemctl start wg-quick@wg0
2018-09-02 19:22:24 +00:00
2018-08-28 14:25:40 +00:00
# Check that it started properly:
sudo systemctl status wg-quick@wg0
2018-09-02 19:22:24 +00:00
2019-04-26 04:56:38 +00:00
# Verify the connection to the AlgoVPN:
2018-08-28 14:25:40 +00:00
sudo wg
2018-09-02 19:22:24 +00:00
2019-04-26 04:56:38 +00:00
# See that your client is using the IP address of your AlgoVPN:
2018-08-28 14:25:40 +00:00
curl ipv4.icanhazip.com
2018-09-02 19:22:24 +00:00
2018-08-28 14:25:40 +00:00
# Optionally configure the connection to come up at boot time:
sudo systemctl enable wg-quick@wg0
```
2019-04-26 04:56:38 +00:00
If your Linux distribution does not use `systemd` you can bring up WireGuard with `sudo wg-quick up wg0` .