Как настроить wireguard vpn на iphone

  • автор:

Установка WireGuard на iOS

Before you start with our guide, please download an configuration file on your mobile.

WireGuard в App Store

Конфигурационные файлы для WireGuard

Установка приложения WireGuard

Скачайте приложение WireGuard, нажав кнопку «приложение WireGuard» выше, которая откроет страницу приложения в App Store.

Откройте приложение WireGuard и нажмите кнопку «Добавить туннель», выберите Создать из файла или архива .

Выберите конфигурационный файл WireGuard, который вы скачали ранее, и разрешите программе добавление VPN-соединения.

WireGuard Client: iOS

In this tutorial, we setup a WireGuard client on iOS (iPhone, for example). Before following this tutorial, you should already have a WireGuard server running. Install the WireGuard app for iOS.

Get the Server Public Key

From the server, print the server’s public key. We’ll need this soon

Create Client Keys

Create private and public keys for the WireGuard client. Protect the private key with a file mode creation mask.

Print the client private key.

Create the Client WireGuard Config

Create the WireGuard client config file at

/wg-client.conf . (Use a command like nano

/wg-client.conf .) Notice the syntax of the client config is the same as the server config.

Configure the Server

Print the client public key.

Edit the WireGuard service config file at /etc/wireguard/wg0.conf . (Use a command like sudo nano /etc/wireguard/wg0.conf .) Add a [Peer] section to the bottom.

Apply the server config change.

Add the Config to the iOS Device

The client config file is on the server. The easy way to copy that config to the client is via QR code. Install qrencode on the WireGuard server.

Print the QR code in the server terminal.

Import Client Config

From the WireGuard iOS app, tap “Add a Tunnel”, or tap the plus symbol at the upper right corner. In the dialog, tap “Create from QR code”. (Allow the WireGuard app to use the camera.) The camera activates; point the camera at the QR code. Name the tunnel and tap “Save”. (Allow the WireGuard app to add VPN configurations.)

How to configure a WireGuard iOS client

This is a coniutation of my free “mini-course” called Gain Flexibility & Increase Privacy with WireGuard VPN. Start there if you are new to WireGuard.

What you’ll achieve

  • We will have our iPhone client connecting to our WireGuard VPN server

This is what it looks like:


  • You need a working WireGuard VPN Server (learn how to set that up here)
  • You need an iPhone/iPad running the latest iOS version

Download WireGuard app from the App Store

Add a tunnel

We need to add a tunnel:

We then want to choose “Create from QR code”:

Using the QR code that we generated on our server, we can now hold our camera up to our QR code to import it. Give it a descriptive name for your connection.

You may be prompted to add this VPN configuration. Be sure to allow it so you can access it through the iOS settings page.

You’ll see it automatically imports everything, similar to our other clients that we have been working with.

You can set the On demand to be “on” if you want to always use your VPN (over LTE and Wi-Fi).

Add your client to your server

Before you can connect, you need to add the client to your server. I go through this on why we need to do this here, but here is the quick solution.

ON YOUR SERVER run this command:


Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *