# Connecting via WireGuard

### Introduction

WireGuard is a tunneling protocol that lets you establish a secure connection, either directly to another host, or to another network or subsection thereof. This can be utilized as a VPN or as a secure entry into another network for accessing storage or other services.

This article is a short walk-through of deploying a wireguard configuration you get from me to access one or more services in my homelab.

### Prerequisites

- A WireGuard config file, archive with password;
- The password for the archive;
- A Linux machine.

<p class="callout warning">If you do not have such a WireGuard config archive or the password, **contact me.**</p>

### Installing dependencies

Since WireGuard comes with the kernel, we will only need to install some utilities.

#### On Debian

```bash
sudo apt install wireguard-tools p7zip
```

#### On Arch Linux

```
sudo pacman -S wireguard-tools 7zip
```

### Unpacking the config

<p class="callout info">This requires a password. You either have received the password already, or will receive it from me via a channel separate to the one I used to give you the archive.</p>

This requires 7z installed:

```
7z x wg.7z
```

You should see a file akin to `WG-<numbers>-<description>-<name>.conf`.

Move the file to your WireGuard directory:

```
sudo mv WG-98-NAS-Example.conf /etc/wireguard/wg1.conf
```

<p class="callout info">You can choose any name for the destination file; just make sure it's a legal network interface name.  
The below file name would result in a network interface called `wg1`.</p>

### Connecting

Assuming you named the file `wg1.conf`:

```
wg-quick up wg1
```

<p class="callout success">And you're done!</p>

Continue reading:

- [Accessing a share (rclone + SMB)](https://wiki.joris.me/books/network-storage/page/accessing-a-share-rclone-smb)
- [Mount a network drive (Linux NFS)](https://wiki.joris.me/books/network-storage/page/mount-a-network-drive-linux-nfs)