Wireguard на роутере tp link

User’s Application Scenario

WireGuard VPN is a modern VPN technology that offers high performance and easy configuration. Compared to OpenVPN, VPN performance has been greatly improved. It is very suitable for remote access application scenarios. This article describes how to establish a WireGuard VPN connection between ER605 v2 as well as a Windows PC.

Configuration

Step 1. Configure WireGuard VPN on the router.

1. Go to VPN —>Wireguard—> Wireguard, click Add and fill in the following parameters:

  • Name: test
  • MTU: 1420 (Default is 1420, no need to modify)
  • Listen Port: 51820 (The default port is 51820, which can be modified)
  • The public key and the private key will automatically generate a string of random numbers, which can be modified without modification.
  • Local IP Address: 192.168.0.2 (This is the IP address of the WireGuard VPN interface, it is recommended not to have the same LAN IP as the router)

2. After the creation, click Export in the figure below to export the public key information from the router and send it to the Windows PC.

Step 2. Configure WireGuard VPN on the Windows PC.

1. Download WireGuard VPN software on the PC, please refer to Installation — WireGuard.

2. Open the WireGuard VPN software and choose Add empty tunnel.

3. Record the public key information and fill in the following parameters:

[Interface]

Address = 10.0.0.1/24 (The interface IP address for the WireGuard VPN, it can fill in what you like)

DNS = 8.8.8.8 (Note that if this parameter is not filled in, the PC will not be able to access the Internet)

[Peer]

PublicKey = Fill in the public key information exported on the Omada Router

AllowedIPs = 0.0.0.0/0

This parameter has two functions: When sending packets, the list of allowed IPs behaves as a sort of routing table, and when receiving packets, the list of allowed IPs behaves as a sort of access control list. 0.0.0.0/0 means that all data sent by the PC goes to the VPN, reaches the peer and is then forwarded by the Omada router.

Endpoint = 192.168.1.110:51820 (Omada Router’s WAN IP address and corresponding port)

4. Save the above configuration as shown below.

Step 3. Configure peer information on the Omada Router.

Go to VPN —>Wireguard—> Peers, click Add, and fill in the following parameters:

  • Interface: test (Choose the WireGurad VPN Interface created just now)
  • Public Key: Fill in the public key information exported from the Windows PC
  • Endpoint and Endpoint Port is the information that needs to be filled in when the Omada Router actively connects to other WireGurad Server, which is not required in this scenario.
  • Allowed Address: 10.0.0.1/24 (The same as the WireGuard VPN interface IP configured on the Windows PC)

Step 4. Connect to the Omada Router using WireGuard VPN.

Click Activate of the WireGuard VPN on the Windows PC to connect to the Omada Router.

Verification process

(1) For the Windows PC:

The Status will change to Active proves that a VPN connection has been successfully established

The PC can access the Omada Router’s LAN side.

(2) For Omada Router:

The WireGuard VPN configuration interface displays information about the amount of data transmitted over the VPN and the connection time.

Get to know more details of each function and configuration please go to Download Center to download the manual of your product.

Is this faq useful?

Your feedback helps improve this site.

What’s your concern with this article?

  • Dissatisfied with product
  • Too Complicated
  • Confusing Title
  • Does not apply to me
  • Too Vague
  • Other

We’d love to get your feedback, please let us know how we can improve this content.

Thank you

We appreciate your feedback.
Click here to contact TP-Link technical support.

для пользователей KeepSolid VPN Unlimited

WireGuard® — это надежный VPN протокол с открытым исходным кодом, который обеспечивает высокий уровень конфиденциальности и безопасности в сети. Больше информации о функциях и технических характеристиках WireGuard® вы можете найти в статье Что такое протокол WireGuard®.

Мы составили для вас подробную инструкцию по настройке WireGuard® VPN клиента на роутере с прошивкой OpenWrt 19.07. и 21.02. В качестве примера был взят роутер TP-Link TL-WR841N.

Примечание: Для настройки WireGuard® VPN клиента на OpenWrt роутере вам необходимо установить последнюю версию OpenWrt прошивки.

Важно! Обратите внимание, что вы несете полную ответственность за самостоятельную настройку вашего устройства с использованием сгенерированных ручных настроек.

I. Сгенерируйте ручные настройки для вашего OpenWrt роутера

1. Войдите в ваш Личный кабинет, выберите приложение VPN Unlimited и нажмите Manage.

2. Выберите устройство из списка или создайте новое. Затем выберите подходящее местоположение сервера и выберите WireGuard® протокол из выпадающего списка.

3. Нажмите Generate. Ниже появятся все необходимые конфигурации для настройки VPN подключения.

II. Настройте WireGuard® VPN клиент на OpenWrt роутере

1. Установите пакеты Wireguard®

1. Подключите ваше устройство к OpenWrt роутеру и введите IP-адрес админ-панели в адресную строку браузера. По умолчанию IP-адрес роутера — 192.168.1.1.

2. Перейдите на вкладку System > Software.

3. Нажмите Update List и подождите пока загрузится страница. Прокрутите страницу вниз и нажмите Dismiss.

4. Скопируйте luci-i18n-wireguard-en в поле ввода и нажмите кнопку Install.

5. Нажмите Install. Опуститесь вниз страницы и нажмите Dismiss.

6. Перейдите на вкладку Installed, в поле поиска введите wireguard и проверьте установлены ли у вас следующие пакеты:

  • wireguard-tools
  • kmod-wireguard
  • luci-app-wireguard
  • luci-i18n-wireguard-en
  • luci-proto-wireguard

7. Чтобы применить изменения, перейдите на вкладку Status и перезагрузите ваш роутер.

2. Создайте интерфейс WireGuard®

1. Перейдите на вкладку NetworkInterfaces > Add New Interface

2. Назовите интерфейс, например VPNUnlimited, и выберите протокол WireGuard®. Нажмите Create Interface.

3. Перейдите на вкладку General Settings и вставьте сведения о настройках конфигурации, которые вы создали ранее:

  • PrivateKey = вставьте PrivateKey из Личного кабинета 
  • ListenPort =  скопируйте детали ListenPort 
  • Address = вставьте информацию об Address

4. Перейдите на вкладку Peers и добавьте следующие данные.

  • PublicKey = вставьте PublicKey из вашего Личного кабинета
  • PresharedKey = скопируйте значение PresharedKey
  • AllowedIPs = вставьте первое значение AllowedIP, нажмите на + и введите второе значение AllowedIP 
  • Установите флажок для поля Route Allowed IPs
  • Endpoint Host = скопируйте значение Endpoint, которое находится до двоеточия
  • Endpoint Port = скопируйте значение Endpoint, которое находится после двоеточия
  • Persistent Keep Alive = вставьте PersistentKeepalive из Личного кабинета

5. Нажмите кнопку Stop (Стоп) в интерфейсе WAN6.

6. Нажмите Save & Apply (Сохранить и применить).

3. Настройка Firewall зон

1. Перейдите в меню Network > Firewall Zone Settings (Сеть — Настройки зон Firewall) и нажмите Add (Добавить)

2. В этом окне введите следующую конфигурацию:

  • Name — выберите любое имя, например vpnunl
  • Input — Reject
  • Output — Accept
  • Forward — Reject
  • Masquerading — Checked
  • MSS clamping — Checked
  • Covered networks — выберите ранее созданный VPN tunnel interface (например VPNUNLIMITED)
  • Allow forward to destination zones — Unspecified
  • Allow forward from source zones — lan

3. Нажмите Save (Сохранить). 

4. Добавьте статический DNS сервер

1. Перейдите на вкладку Interface > WAN > нажмите Edit > выберите Advanced Settings. Снимите флажок с опции Use DNS servers advertised by Peers и вставьте данные DNS из вашего Личного кабинета и нажмите на +.

2. Нажмите Save.

3. Нажмите Save и Apply.

Примечание: Если у вас возникли какие-либо проблемы с VPN-соединением, перезагрузите ваш роутер. Для этого перейдите на вкладку Status и нажмите Reboot.

5. Добавить Kill Switch (Опционально)

1. Перейдите в меню Network > Firewall (Сеть — Firewall) и нажмите Edit (Редактировать) в LAN Firewall Zone (Зона Firewall локальной сети).

2. В этом окне введите следующую конфигурацию:

3. Удалите wan из «Allow forward to destination zones» (Разрешить переадресацию в зоны назначения)

Remove wan from Allow forward to destination zones

Отлично, вы закончили настройку WireGuard® VPN соединения для OpenWrt роутера.

Если у вас остались какие-либо вопросы или комментарии, не стесняйтесь обращаться в нашу службу поддержки по адресу [email protected].

«WireGuard» является зарегистрированным товарным знаком Джейсона А. Доненфельда.

Готовы попробовать наш VPN?

Настройте VPN Unlimited на своем маршрутизаторе OpenWRT, защитите интернет-трафик роутера и других устройств!

Configuring a VPN on Ubuntu allows you to access and secure your internet connection with increased privacy and security. In this step-by-step guide, we will explain how to configure Wireguard VPN on Ubuntu behind a TP-LINK router/firewall.

Prerequisites

Before we start the configuration process, ensure that you have the following prerequisites:

  • A TP-LINK router/firewall device
  • A Ubuntu machine
  • Root access to your Ubuntu machine
  • A Wireguard config file

Step 1: Install Wireguard on Ubuntu

The first step is to install Wireguard on your Ubuntu machine. You can do this using the following command:

sudo apt-get update 
sudo apt-get install wireguard 

Step 2: Generate Wireguard Keys

The next step is to generate Wireguard keys. You can do this using the following commands:

$ cd /etc/wireguard 
$ umask 077 
$ wg genkey | tee privatekey | wg pubkey > publickey 

This generates the private and public keys in the /etc/wireguard directory.

Step 3: Configure Firewall and Router

To configure the firewall and router, you need to open the UDP port 50505. This will allow your Ubuntu machine to connect to your network. To do this, log in to your TP-LINK router/firewall and navigate to the firewall settings. Add a new rule allowing traffic on port 50505 and save the changes.

Step 4: Configure Wireguard

The next step is to configure Wireguard. You can configure Wireguard using the following commands:

$ cd /etc/wireguard 
$ touch wg0.conf 

Next, open the wg0.conf file using a text editor and add the following configuration:

[Interface] 
PrivateKey = <private_key> 
Address = 10.0.0.1/24 
ListenPort = 50505 

[Peer] 
PublicKey = <your_peer_public_key> 
AllowedIPs = 10.0.0.2/32 

Ensure that you replace <private_key> with your private key and <your_peer_public_key> with your peer public key.

Step 5: Start Wireguard

The final step is to start the Wireguard service using the following command:

sudo systemctl start wg-quick@wg0 

Your Wireguard VPN is now configured on your Ubuntu machine and ready for use.

Conclusion

In this step-by-step guide, we have explained how to configure Wireguard VPN on Ubuntu behind a TP-LINK router/firewall. By following these steps, you can access the internet with increased privacy and security.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

1
branch

0
tags


Code

  • Use Git or checkout with SVN using the web URL.

  • Open with GitHub Desktop

  • Download ZIP

Latest commit

Files

Permalink

Failed to load latest commit information.

Type

Name

Latest commit message

Commit time

tl-wr841n-WireGuard

https://openwrt.org/docs/guide-user/services/vpn/wireguard/client

https://forum.openwrt.org/t/build-for-tp-link-tl-wr841n-d-all-versions/428

LEDE Reboot
LuCI with https
IPv6 and PPPoE
MiniUPnP
OpenVPN with mbed TLS
QoS
DDNS
Wget with https
Reghack (WiFi channels 12 and 13)
Minified LuCI’s CSS and JS
Compiled with GCC 6.3
Removed kernel debugging
Nothing else has been touched. Basically, it is a ‘make defconfig’ + profile + the mentioned above
Free ROM: 76 KB
OpenVPN AES-128-CBC speed: 12Mbs/12Mbs (measured on v8 downloading ubuntu via a torrent)

https://www.dropbox.com/sh/w91lnen1g9ikuf3/AACyMjOACC0-WVFzi1Lb1O0da?dl=0

https://gist.github.com/amq/f3895b208850ab07c5e2e855fa5fcab9

# Configuration parameters
WG_IF="wg0"
WG_SERV="2.X.X.x"
WG_PORT="51820"
WG_ADDR="10.0.0.8/32"
# WG_ADDR6="fdf1:7610:d152:3a9c::2/64"

umask u=rw,g=,o=
wg genkey | tee wgclient.key | wg pubkey > wgclient.pub
 
# WG_KEY="$(cat wgclient.key)"
WG_KEY="+Jae="
# WG_PSK=""
WG_PUB="O+v="

# Configure firewall
uci rename firewall.@zone[0]="lan"
uci rename firewall.@zone[1]="wan"
uci rename firewall.@forwarding[0]="lan_wan"
uci del_list firewall.wan.network="${WG_IF}"
uci add_list firewall.wan.network="${WG_IF}"
uci commit firewall
/etc/init.d/firewall restart

# Configure network
uci -q delete network.${WG_IF}
uci set network.${WG_IF}="interface"
uci set network.${WG_IF}.proto="wireguard"
uci set network.${WG_IF}.private_key="${WG_KEY}"
uci set network.${WG_IF}.listen_port="${WG_PORT}"
uci add_list network.${WG_IF}.addresses="${WG_ADDR}"
# uci add_list network.${WG_IF}.addresses="${WG_ADDR6}"
 
# Add VPN peers
uci -q delete network.wgserver
uci set network.wgserver="wireguard_${WG_IF}"
uci set network.wgserver.public_key="${WG_PUB}"
# uci set network.wgserver.preshared_key="${WG_PSK}"
uci set network.wgserver.endpoint_host="${WG_SERV}"
uci set network.wgserver.endpoint_port="${WG_PORT}"
uci set network.wgserver.route_allowed_ips="1"
uci set network.wgserver.persistent_keepalive="25"
uci add_list network.wgserver.allowed_ips="0.0.0.0/1"
uci add_list network.wgserver.allowed_ips="128.0.0.0/1"
uci add_list network.wgserver.allowed_ips="::/0"
uci commit network
/etc/init.d/network restart

traceroute openwrt.org

OpenWrt Forum

Loading

Другие наши интересноые статьи:

  • Windows xp как роутер между двумя сетями
  • Windows xp как wi fi роутеры
  • Windows 10 не видит мой wifi роутер
  • Windows xp и windows 7 в домашней сети на одном роутере
  • Windows 10 нет доступа к сетевой папке на роутере

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии