Skip to content

Latest commit

 

History

History
128 lines (79 loc) · 4.54 KB

wireguard.md

File metadata and controls

128 lines (79 loc) · 4.54 KB

WireGuard

Description

WireGuard is an extremely simple yet fast and modern VPN that utilises state-of-the-art cryptography.

Directory

References


Connecting to WireGuard

Important

You will need to have created and exported a WireGuard configuration file for the device you are setting up.

Description

This guide details how to connect to an existing WireGuard VPN on various platforms.

References

Linux

Note

Parts of this guide assumes that you are using the KDE Plasma desktop environment.

  1. Launch the KDE Plasma Settings application.

  2. Locate the Network section and click on the Connections menu item.

  3. Click the + (Add new connection) button.

  4. Choose the Import VPN Connection... connection type and click the Create button.

  5. In the newly opened Import VPN Connection file manager window, select your WireGuard client configuration (.conf) file, and click the Open button.

    [!TIP]
    If you receive an error stating, Failed to import VPN connection: The file to import wasn’t a valid OpenVPN client configuration, try and rename the file differently i.e. myvpndomain.com.conf and retry importing it.

  6. If the client configuration has been imported successfully, you can now connect to it by right clicking the WireGuard VPN connection from the Connections list and click the Connect context menu option.

macOS

Note

The steps to connect to an existing WireGuard VPN on macOS should be similar to iOS, but due to a longstanding issue the macOS version of the WireGuard app suffers from, we recommend the folowing steps instead.

  1. Install the wireguard-tools and wireguard-go packages using Homebrew:

    brew install -v wireguard-tools wireguard-go
  2. Identify the device name of the network interface that you use:

    networksetup -listallhardwareports

    In our example, our network interface is our Wi-Fi and its device name is en0.

  3. Copy over your WireGuard client configuration file to where WireGuard expects it:

    If you are doing this on an Apple Silicon Mac (M1 and newer):

    cp <WIREGUARD_CONFIG_FILE> /opt/homebrew/etc/wireguard/<NETWORK_DEVICE_NAME>.conf

    If you are doing this on an Intel Mac:

    cp <WIREGUARD_CONFIG_FILE> /usr/local/etc/wireguard/<NETWORK_DEVICE_NAME>.conf

    [!NOTE]
    Make sure to replace <WIREGUARD_CONFIG_FILE> with the path to your WireGuard client configuration (.conf) file and <NETWORK_DEVICE_NAME> with the name of the network interface device i.e. en0.

  4. To connect to the WireGuard VPN connection, run the following command:

    wg-quick up <NETWORK_DEVICE_NAME>

    When prompted to enter your password, enter your user password accordingly.

    Ending the VPN connection is similar but using the down command instead:

    wg-quick down <NETWORK_DEVICE_NAME>

    [!TIP]
    Similar to before, make sure to replace <NETWORK_DEVICE_NAME> with the name of the network interface device i.e. en0.

iOS

  1. Launch the App Store application.

  2. Search for the WireGuard app and install it to your device.

  3. Launch the WireGuard app.

  4. Press the + button in the top right corner.

  5. In the Add a new WireGuard tunnel menu, select the Create from file or archive option.

  6. When prompted with the file manager app, locate and select your WireGuard client configuration (.conf) file.

  7. Once the client configuration file has been imported, you may connect to it right from the WireGuard app by toggling the switch corresponding to the client connection you have set up.