<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Wireguard on fruworg</title><link>https://fruw.supa.dog/tags/wireguard/</link><description>Recent content in Wireguard on fruworg</description><generator>Hugo -- gohugo.io</generator><language>ru-RU</language><lastBuildDate>Wed, 05 Jun 2024 17:37:00 +0600</lastBuildDate><atom:link href="https://fruw.supa.dog/tags/wireguard/index.xml" rel="self" type="application/rss+xml"/><item><title>WireGuard. Установка и настройка</title><link>https://fruw.supa.dog/posts/rknb-wg/</link><pubDate>Wed, 05 Jun 2024 17:37:00 +0600</pubDate><guid>https://fruw.supa.dog/posts/rknb-wg/</guid><description>Подготовка На сервере и клиенте необходимо установить пакет wireguard и сгенерировать публичный и приватный ключи:
apt install wireguard cd /etc/wireguard wg genkey | tee privatekey | wg pubkey &amp;gt; publickey Конфигурация сервера Форвардинг пакетов В файл /etc/sysctl.conf необходимо добавить следующие строки:
net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1 И подгрузить эти значения командой sysctl -p
Конфигурация WireGuard В файл /etc/wireguard/&amp;lt;conn-name&amp;gt;.conf необходимо дописать следующее:
[Interface] PrivateKey = &amp;lt;private-key&amp;gt; Address = 172.0.0.1/24 PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o &amp;lt;interface&amp;gt; -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o &amp;lt;interface&amp;gt; -j MASQUERADE ListenPort = 51820 [Peer] PublicKey = &amp;lt;public-key&amp;gt; AllowedIPs = 172.</description></item><item><title>Добавление WireGuard в GUI Gnome</title><link>https://fruw.supa.dog/posts/wg-gnome-gui/</link><pubDate>Sat, 16 Dec 2023 17:10:00 +0600</pubDate><guid>https://fruw.supa.dog/posts/wg-gnome-gui/</guid><description>Добавление nmcli connection import type wireguard file /etc/wireguard/&amp;lt;wg-conn-name&amp;gt;.conf</description></item></channel></rss>