{"id":2644,"date":"2026-07-08T17:21:48","date_gmt":"2026-07-08T14:21:48","guid":{"rendered":"https:\/\/unlis.ru\/?p=2644"},"modified":"2026-07-08T19:13:25","modified_gmt":"2026-07-08T16:13:25","slug":"%d0%ba%d0%b0%d1%81%d0%ba%d0%b0%d0%b4%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-vpn-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80%d0%be%d0%b2","status":"publish","type":"post","link":"https:\/\/unlis.ru\/?p=2644","title":{"rendered":"\u041a\u0430\u0441\u043a\u0430\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 VPN-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432"},"content":{"rendered":"<p style=\"text-align: justify;\">\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u0430\u0441\u043a\u0430\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 VPN \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 Amnezia WireGuard 2.0 + \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 OpenVPN<\/p>\n<h4 style=\"text-align: justify;\">0. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h4>\n<p style=\"text-align: justify;\">\u0421\u0435\u0440\u0432\u0435\u0440 \u0410:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Debian 13.<\/li>\n<li>\u041c\u0435\u0441\u0442\u043e\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435: &#171;\u0422\u0443\u0442&#187;<\/li>\n<li>OpenVPN + PKI + \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u0434\u0441\u0435\u0442\u044c 10.8.0.0\/24<\/li>\n<li>\u041a\u043b\u0438\u0435\u043d\u0442 Amnezia Wireguard<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f policy-based routing, \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0438\u0437 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 OpenVPN \u0442\u0443\u043d\u043d\u0435\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 B<\/li>\n<li>NAT \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f<\/li>\n<li>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth0<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u0421\u0435\u0440\u0432\u0435\u0440 B:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Debian 13<\/li>\n<li>\u041c\u0435\u0441\u0442\u043e\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435: &#171;\u0422\u0430\u043c&#187;<\/li>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 Amnezia Wireguard. \u041f\u043e\u0434\u0441\u0435\u0442\u044c 192.168.100.0\/30 (\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u044f), \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 24 \u043c\u0430\u0441\u043a\u0443, \u043d\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e<\/li>\n<li>\u0412\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a, \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 AWG \u0442\u0443\u043d\u043d\u0435\u043b\u044c \u0438\u0437 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440\u0430 A NAT-\u0438\u0442\u0441\u044f \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<\/li>\n<li>\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 eth0<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><strong>\u041d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445<\/strong> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c IP Forwarding:<\/p>\n<p class=\"cm-content q9tKkq_readonly m-0\" style=\"text-align: justify;\"><code><span class=\"\u037c10\">echo<\/span> <span class=\"\u037cz\">\"net.ipv4.ip_forward=1\"<\/span> &gt; \/etc\/sysctl.d\/99-forward.conf<\/code><\/p>\n<p class=\"cm-content q9tKkq_readonly m-0\" style=\"text-align: justify;\"><code>sysctl <span class=\"\u037c12\">--system<\/span><\/code><\/p>\n<p class=\"cm-content q9tKkq_readonly m-0\" style=\"text-align: justify;\">(\u043d\u0435 sysctl -p, \u0432 \u043d\u043e\u0432\u044b\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0443\u0434\u0438\u043c\u0435\u043d\u0442 \/etc\/sysctl.conf)<\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 14px;\">\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c. <\/span>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code><span class=\"\u037c10\">cat<\/span> \/proc\/sys\/net\/ipv4\/ip_forward<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c &#171;1&#187;<\/p>\n<p style=\"text-align: justify;\">\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0438\u043c\u0435\u044e\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 ACCEPT. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 DNS, \u0445\u043e\u0442\u044f \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 (\u043d\u043e \u043d\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438).<\/p>\n<h4 style=\"text-align: justify;\">1. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c OpenVPN \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 A<\/h4>\n<p style=\"text-align: justify;\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0442\u0438\u043f\u043e\u0432\u0430\u044f, \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e.<\/p>\n<p style=\"text-align: justify;\">\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<p style=\"text-align: justify;\"><code>apt install openvpn easy-rsa<\/code><\/p>\n<ul style=\"text-align: justify;\">\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 (PKI)<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><code><span class=\"\u037c10\">mkdir<\/span> <span class=\"\u037c12\">-p<\/span> \/etc\/openvpn\/easy-rsa<\/code><br \/>\n<code><span class=\"\u037c10\">cp<\/span> <span class=\"\u037c12\">-r<\/span> \/usr\/share\/easy-rsa\/* \/etc\/openvpn\/easy-rsa\/<\/code><br \/>\n<code><span class=\"\u037c10\">cd<\/span> \/etc\/openvpn\/easy-rsa<\/code><br \/>\n<code>.\/easyrsa init-pki<\/code><\/p>\n<ul style=\"text-align: justify;\">\n<li>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c CA-\u043a\u043b\u044e\u0447<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043b\u0438\u0431\u043e <code>.\/easyrsa build-ca<\/code> &#8212; \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0449\u0438\u0449\u0435\u043d \u043f\u0430\u0440\u043e\u043b\u0435\u043c, \u0435\u0441\u043b\u0438 \u0441\u0435\u043a\u044c\u044e\u0440\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0432\u0430\u0436\u043d\u0430 &#8212; \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>.\/easyrsa build-ca nopass<br \/>\n<\/code>\u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 Common Name &#8212; \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e, \u043b\u0438\u0431\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/p>\n<ul style=\"text-align: justify;\">\n<li class=\"PDq2pG_selectionAnchorContainer\" data-start=\"533\" data-end=\"559\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/li>\n<\/ul>\n<p class=\"cm-content q9tKkq_readonly m-0\" style=\"text-align: justify;\">\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c <code>.\/easyrsa build-server-full server nopass<br \/>\n<\/code>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 825 \u0434\u043d\u0435\u0439.<\/p>\n<ul style=\"text-align: justify;\">\n<li class=\"PDq2pG_selectionAnchorContainer\" data-start=\"699\" data-end=\"709\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c DH<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><code>.\/easyrsa gen-dh<\/code><\/p>\n<ul style=\"text-align: justify;\">\n<li data-start=\"741\" data-end=\"757\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c TLS \u043a\u043b\u044e\u0447<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><code>openvpn <span class=\"\u037c12\">--genkey<\/span> secret ta.key<\/code><\/p>\n<ul style=\"text-align: justify;\">\n<li>\u041d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \/etc\/openvpn\/easy-rsa, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \/etc\/openvpn\/server \u043a\u043b\u044e\u0447\u0438 \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><code><span class=\"\u037c10\">cp<\/span> pki\/ca.crt \/etc\/openvpn\/server\/<\/code><br \/>\n<code><span class=\"\u037c10\">cp<\/span> pki\/private\/server.key \/etc\/openvpn\/server\/<\/code><br \/>\n<code><span class=\"\u037c10\">cp<\/span> pki\/issued\/server.crt \/etc\/openvpn\/server\/<\/code><br \/>\n<code><span class=\"\u037c10\">cp<\/span> pki\/dh.pem \/etc\/openvpn\/server\/<\/code><br \/>\n<code><span class=\"\u037c10\">cp<\/span> ta.key \/etc\/openvpn\/server\/<\/code><\/p>\n<ul style=\"text-align: justify;\">\n<li>\u041f\u0438\u043b\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \/etc\/openvpn\/server\/server.conf<\/li>\n<\/ul>\n<blockquote><p>port 1194<br \/>\nproto udp<br \/>\ndev tun<\/p>\n<p>ca ca.crt<br \/>\ncert server.crt<br \/>\nkey server.key<br \/>\ndh dh.pem<\/p>\n<p>tls-auth ta.key 0<\/p>\n<p>topology subnet<\/p>\n<p>server 10.8.0.0 255.255.255.0<\/p>\n<p>ifconfig-pool-persist ipp.txt<\/p>\n<p>push &#171;redirect-gateway def1 bypass-dhcp&#187;<\/p>\n<p>keepalive 10 120<\/p>\n<p>persist-key<br \/>\npersist-tun<\/p>\n<p>user nobody<br \/>\ngroup nogroup<\/p>\n<p>cipher AES-256-GCM<br \/>\ndata-ciphers AES-256-GCM:AES-128-GCM<\/p>\n<p>auth SHA256<\/p>\n<p>explicit-exit-notify 1<\/p>\n<p>verb 3<\/p><\/blockquote>\n<ul style=\"text-align: justify;\">\n<li>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><code>systemctl enable --now openvpn-server@server<\/code><br \/>\n<code>systemctl status openvpn-server@server<br \/>\n<\/code>\u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c active (running), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 tun0 \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c 10.8.0.1\/24<\/p>\n<ul style=\"text-align: justify;\">\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 OpenVPN<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u041c\u043e\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0438 \u043a\u043b\u044e\u0447\u0438 \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433<br \/>\n\u0418\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \/etc\/openvpn\/easy-rsa \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>.\/easyrsa build-client-full client1 nopass<\/code>, \u0433\u0434\u0435 client1 \u00a0&#8212; \u0438\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430<br \/>\n\u041a\u043e\u043d\u0444\u0438\u0433 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u0440\u0438\u043c\u0435\u0442 \u0432\u0438\u0434<\/p>\n<blockquote><p>client<br \/>\ndev tun<br \/>\nproto udp<\/p>\n<p>remote &lt;IP_\u0421\u0415\u0420\u0412\u0415\u0420\u0410 \u0410&gt; 1194<\/p>\n<p>resolv-retry infinite<br \/>\nnobind<\/p>\n<p>persist-key<br \/>\npersist-tun<\/p>\n<p>remote-cert-tls server<\/p>\n<p>cipher AES-256-GCM<br \/>\ndata-ciphers AES-256-GCM:AES-128-GCM<\/p>\n<p>auth SHA256<\/p>\n<p>key-direction 1<\/p>\n<p>verb 3<\/p>\n<p>&lt;ca&gt;<br \/>\n\u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 pki\/ca.crt<br \/>\n&lt;\/ca&gt;<\/p>\n<p>&lt;cert&gt;<br \/>\n\u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 pki\/issued\/client1.crt<br \/>\n&lt;\/cert&gt;<\/p>\n<p>&lt;key&gt;<br \/>\n\u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 pki\/private\/client1.key<br \/>\n&lt;\/key&gt;<\/p>\n<p>&lt;tls-auth&gt;<br \/>\n\u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 ta.key<br \/>\n&lt;\/tls-auth&gt;<\/p><\/blockquote>\n<p style=\"text-align: justify;\">\u041b\u0438\u0431\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c<\/p>\n<p style=\"text-align: justify;\"><em>&lt;\u0437\u0434\u0435\u0441\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u043e \u043e\u043d gone away&#8230;&gt;<\/em><\/p>\n<h4 style=\"text-align: justify;\">2. \u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c AmneziaWG<\/h4>\n<p style=\"text-align: justify;\">\u0411\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 &#8212; DKMS-\u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b awg-tools. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c PPA \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043e\u0442 ubuntu, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u0440\u0446\u0430\u043c\u0438. \u041f\u043e\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043d\u0430 <strong>\u043e\u0431\u043e\u0438\u0445 <\/strong>\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445.<\/p>\n<ul style=\"text-align: justify;\">\n<li>\u0421\u0442\u0430\u0432\u0438\u043c \u043a\u0443\u0445\u043d\u044e<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><code>apt install git dkms build-essential linux-headers-$(uname -r)<\/code><br \/>\n<code>cd \/usr\/src<\/code><br \/>\n<code>git clone https:\/\/github.com\/amnezia-vpn\/amneziawg-linux-kernel-module.git amneziawg<\/code><\/p>\n<ul style=\"text-align: justify;\">\n<li>\u0421\u0442\u0430\u0432\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0447\u0435\u0440\u0435\u0437 DKMS:<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><code><span class=\"\u037c10\">cd<\/span> \/usr\/src\/amneziawg\/sr\u0441<\/code><br \/>\n<code><span class=\"\u037c10\">make<\/span> dkms-install<\/code><br \/>\n<code>dkms add -m amneziawg -v 1.0.0<\/code><br \/>\n<code>dkms build -m amneziawg -v 1.0.0<\/code><br \/>\n<code>dkms install -m amneziawg -v 1.0.0<\/code><\/p>\n<ul style=\"text-align: justify;\">\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c<\/li>\n<\/ul>\n<p class=\"cm-content q9tKkq_readonly m-0\" style=\"text-align: justify;\"><code>dkms status<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 <em>amneziawg\/1.0.0, 6.12.95+deb13-cloud-amd64, x86_64: installed<\/em><\/p>\n<p style=\"text-align: justify;\"><code>modprobe amneziawg <\/code><\/p>\n<p style=\"text-align: justify;\"><code>lsmod <span class=\"token token\">|<\/span> <span class=\"token token\">grep<\/span> amneziawg<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c amneziawg \u0438 \u0435\u0433\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 (<em>libchacha20poly1305<\/em>, <em>udp_tunnel<\/em> \u0438 \u043f\u0440\u043e\u0447\u0438\u0435)<\/p>\n<ul style=\"text-align: justify;\">\n<li>\u0421\u0442\u0430\u0432\u0438\u043c awg-tools<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><code>cd \/usr\/src\/<\/code><br \/>\n<code>git clone https:\/\/github.com\/amnezia-vpn\/amneziawg-tools.git<\/code><br \/>\n<code><span class=\"token token\">cd<\/span> amneziawg-tools\/src<\/code><br \/>\n<code>make install<\/code><\/p>\n<ul style=\"text-align: justify;\">\n<li>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0448\u0438 \u043f\u0443\u0442\u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f. \u041f\u0438\u043b\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (<strong>\u0421\u0435\u0440\u0432\u0435\u0440 B<\/strong>)<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u041d\u0430\u0447\u0430\u043b\u043e \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e WG &#8212; \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u0430\u0440\u044b \u043a\u043b\u044e\u0447\u0435\u0439<\/p>\n<p style=\"text-align: left;\"><code>awg genkey | tee \/etc\/amnezia\/amneziawg\/server_privatekey | awg pubkey | tee \/etc\/amnezia\/amneziawg\/server_publickey<\/code><\/p>\n<p style=\"text-align: justify;\">\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c <code>\/etc\/amnezia\/amneziawg\/awg0.conf<\/code><\/p>\n<blockquote><p>[Interface]<br \/>\nPrivateKey = <em>&lt;\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \/etc\/amnezia\/amneziawg\/server_privatekey&gt;<\/em><br \/>\nAddress = 192.168.100.1\/30<br \/>\n# \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0440\u0442<br \/>\nListenPort = 39743<br \/>\n# \u041c\u0430\u0441\u043a\u0430\u0440\u0430\u0434\u0438\u043c \u0442\u0440\u0430\u0444\u0438\u043a, \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0439 \u0441 \u0441\u0435\u0442\u0438 OpenVPN \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441<br \/>\nPostUp = iptables -t nat -A POSTROUTING -s 10.8.0.0\/24 -o eth0 -j MASQUERADE<br \/>\nPostDown = iptables -t nat -D POSTROUTING -s 10.8.0.0\/24 -o eth0 -j MASQUERADE<br \/>\n# \u041d\u0438\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u044e\u0442 \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044e.<br \/>\nJc = 4<br \/>\nJmin = 77<br \/>\nJmax = 148<br \/>\nS1 = 72<br \/>\nS2 = 82<br \/>\nS3 = 13<br \/>\nS4 = 23<br \/>\nH1 = 686090309-771938546<br \/>\nH2 = 980996358-1363648663<br \/>\nH3 = 1371752148-1574630916<br \/>\nH4 = 1607849087-1706193491<br \/>\nI1 = &lt;r 111&gt;<\/p><\/blockquote>\n<p style=\"text-align: justify;\">\u041f\u0440\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<table>\n<thead>\n<tr style=\"height: 24px;\">\n<th style=\"width: 9.28343%; height: 24px;\">\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/th>\n<th style=\"width: 28.247%; height: 24px;\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<th style=\"width: 24.5889%; height: 24px;\">\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d<\/th>\n<th style=\"width: 19.8437%; height: 24px;\">\u041f\u0440\u0438\u043c\u0435\u0440<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>Jc<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e junk-\u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">3-6<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>5<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>Jmin<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">\u041c\u0438\u043d. \u0440\u0430\u0437\u043c\u0435\u0440 junk (\u0431\u0430\u0439\u0442)<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">40-89<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>55<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>Jmax<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">\u041c\u0430\u043a\u0441. \u0440\u0430\u0437\u043c\u0435\u0440 junk (\u0431\u0430\u0439\u0442)<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">Jmin+50..Jmin+250<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>200<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>S1<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">Padding init-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u0431\u0430\u0439\u0442)<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">15-150<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>72<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>S2<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">Padding response-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u0431\u0430\u0439\u0442)<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">15-150, S1+56\u2260S2<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>56<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>S3<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">Padding cookie-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u0431\u0430\u0439\u0442)<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">8-55<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>32<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>S4<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">Padding data-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u0431\u0430\u0439\u0442)<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">4-27<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>16<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>H1<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 init-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d uint32<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>134567-245678<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>H2<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 response-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d uint32<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>3456789-4567890<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>H3<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 cookie-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d uint32<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>56789012-67890123<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>H4<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 data-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d uint32<\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>456789012-567890123<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>I1<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">CPS concealment packet<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">\u0424\u043e\u0440\u043c\u0430\u0442\u00a0<code>&lt;r N&gt;<\/code><\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>&lt;r 128&gt;<\/code><\/td>\n<\/tr>\n<tr style=\"height: 25px;\">\n<td style=\"width: 9.28343%; height: 25px;\"><code>I2<\/code>&#8212;<code>I5<\/code><\/td>\n<td style=\"width: 28.247%; height: 25px;\">\u0414\u043e\u043f. CPS \/ special-junk \u043f\u0430\u043a\u0435\u0442\u044b, \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b<\/td>\n<td style=\"width: 24.5889%; height: 25px;\">\u0422\u0435\u0433\u0438\u00a0<code>&lt;r N&gt;<\/code>\u00a0\/\u00a0<code>&lt;b 0xHEX&gt;<\/code>\u00a0\/\u00a0<code>&lt;c&gt;<\/code>\u00a0\/\u00a0<code>&lt;t&gt;<\/code><\/td>\n<td style=\"width: 19.8437%; height: 25px;\"><code>&lt;b 0xf1&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p dir=\"auto\" style=\"text-align: justify;\"><strong><br \/>\n\u041a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ul dir=\"auto\" style=\"text-align: justify;\">\n<li>H1-H4 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b\u00a0<strong>\u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u044c\u0441\u044f<\/strong>.<\/li>\n<li><code>S1 + 56 \u2260 S2<\/code>\u00a0\u2014 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 init \u0438 response \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/li>\n<li>\u0412\u0441\u0435 \u0443\u0437\u043b\u044b (\u0441\u0435\u0440\u0432\u0435\u0440 + \u043a\u043b\u0438\u0435\u043d\u0442\u044b)\u00a0<strong>\u0434\u043e\u043b\u0436\u043d\u044b<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430).<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0443\u0442 <a href=\"https:\/\/habr.com\/ru\/companies\/amnezia\/articles\/1014636\/\" target=\"_blank\" rel=\"noopener\">https:\/\/habr.com\/ru\/companies\/amnezia\/articles\/1014636\/<\/a> \u0438\u043b\u0438 \u0442\u0443\u0442 <a href=\"https:\/\/github.com\/bivlked\/amneziawg-installer\/blob\/main\/ADVANCED.md#awg2-params-adv\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/bivlked\/amneziawg-installer\/blob\/main\/ADVANCED.md#awg2-params-adv<\/a><\/p>\n<p style=\"text-align: justify;\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0413\u0435\u043d\u0435\u0440\u0438\u043c \u043a\u043b\u044e\u0447\u0438:<\/p>\n<p style=\"text-align: left;\"><code>awg genkey | tee \/etc\/amnezia\/amneziawg\/client_privatekey | awg pubkey | tee \/etc\/amnezia\/amneziawg\/client_publickey<\/code><\/p>\n<p style=\"text-align: justify;\">\u0412 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 <code>\/etc\/amnezia\/amneziawg\/awg0.conf<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u043a\u0446\u0438\u044e<\/p>\n<blockquote><p># Name = Server A<br \/>\n[Peer]<br \/>\nPublicKey = &lt;\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>\/etc\/amnezia\/amneziawg\/client_publickey<\/code>&gt;<br \/>\n# \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043b\u0438\u043d\u043a\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c \u0438 \u0441\u0435\u0442\u044c OpenVPN \u0441\u0435\u0440\u0432\u0435\u0440\u0430 A. \u0417\u0430\u043e\u0434\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u043a \u043f\u043e\u0434\u0441\u0435\u0442\u0438 OpenVPN<br \/>\nAllowedIPs = 192.168.100.2\/30, 10.8.0.0\/24<\/p><\/blockquote>\n<ul style=\"text-align: justify;\">\n<li>\u041f\u0438\u043b\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \/etc\/amnezia\/amneziawg\/awg0.conf &#8212; <strong>\u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 A<\/strong><\/li>\n<\/ul>\n<blockquote><p>[Interface]<br \/>\nPrivateKey = &lt;\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \/etc\/amnezia\/amneziawg\/client_privatekey \u0441 <strong>\u0421\u0435\u0440\u0432\u0435\u0440\u0430 B<\/strong>&gt;<br \/>\nAddress = 192.168.100.2\/30<br \/>\n# \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0440\u0442<br \/>\nListenPort = 31764<br \/>\n# \u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438<br \/>\nTable = off<br \/>\n# \u0417\u0430\u0434\u0430\u0451\u043c route policy &#8212; \u0432\u0435\u0441\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u0441\u0435\u0442\u0438 OpenVPN \u0437\u0430\u0433\u043e\u043d\u044f\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 100<br \/>\nPostUp = ip route replace default via 192.168.100.1 dev awg0 table 100<br \/>\nPostUp = ip rule add from 10.8.0.0\/24 table 100<br \/>\nPostDown = ip rule del from 10.8.0.0\/24 table 100<br \/>\n# \u041d\u0438\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u044e\u0442 \u043e\u0431\u0444\u0443\u0441\u043a\u0430\u0446\u0438\u044e. \u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0436\u0435, \u043a\u0430\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 A<br \/>\nJc = 4<br \/>\nJmin = 77<br \/>\nJmax = 148<br \/>\nS1 = 72<br \/>\nS2 = 82<br \/>\nS3 = 13<br \/>\nS4 = 23<br \/>\nH1 = 686090309-771938546<br \/>\nH2 = 980996358-1363648663<br \/>\nH3 = 1371752148-1574630916<br \/>\nH4 = 1607849087-1706193491<br \/>\nI1 = &lt;r 111&gt;<\/p>\n<p>[Peer]<br \/>\nPublicKey = &lt;\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>\/etc\/amnezia\/amneziawg\/server_publickey<\/code> \u0441 <strong>\u0421\u0435\u0440\u0432\u0435\u0440\u0430 B<\/strong>&gt;<br \/>\n# \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u0430\u0434\u0440\u0435\u0441. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0441\u044f default \u043c\u0430\u0440\u0448\u0440\u0443\u0442 &#8212; \u0432\u044b\u0448\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 Table = off<br \/>\nAllowedIPs = 0.0.0.0\/0<br \/>\nEndpoint = &lt;\u0410\u0434\u0440\u0435\u0441:\u043f\u043e\u0440\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 B&gt;<\/p><\/blockquote>\n<ul style=\"text-align: justify;\">\n<li>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><strong>\u041d\u0430 \u043e\u0431\u043e\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445<\/strong> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u0435\u043c\u043e\u043d\u0430<br \/>\n<code>systemctl enable --now awg-quick@awg0<\/code><\/p>\n<p style=\"text-align: justify;\">\u0414\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0437\u0434\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 awg0 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 IP<\/p>\n<p style=\"text-align: justify;\">\u041f\u0438\u043d\u0433\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u0430 \u043f\u043e \u0442\u0443\u043d\u043d\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c &#8212; \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p style=\"text-align: justify;\"><strong>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0410<\/strong> (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 &#171;\u0442\u0443\u0442&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 AmneziaWG) \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 100, \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<p style=\"text-align: justify;\"><code>ip rule show<\/code><\/p>\n<blockquote><p>32765: from 10.8.0.0\/24 lookup 100<\/p><\/blockquote>\n<p style=\"text-align: justify;\"><code>ip route list table 100<\/code><\/p>\n<blockquote><p>default via 192.168.100.1 dev awg0<\/p><\/blockquote>\n<p style=\"text-align: justify;\"><strong>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 B<\/strong> \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u043e NAT (\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u0441\u043a\u0430\u0440\u0430\u0434\u0438\u043d\u0433 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443 &#8212; &#171;\u043f\u043e\u043a\u0440\u0430\u0441\u0438\u0442\u044c&#187; \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 awg0 \u0438 \u043f\u043e\u0442\u043e\u043c \u043f\u043e \u044d\u0442\u043e\u0439 \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c NAT \u043d\u0430\u0440\u0443\u0436\u0443, \u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u0435\u0435)<\/p>\n<p style=\"text-align: justify;\"><code>iptables -t nat -L<\/code><\/p>\n<blockquote><p>Chain POSTROUTING (policy ACCEPT)<br \/>\ntarget prot opt source destination<br \/>\nMASQUERADE all &#8212; 10.8.0.0\/24 anywhere<\/p><\/blockquote>\n<p style=\"text-align: justify;\">\u0438\u043b\u0438 <code>iptables-save<\/code><\/p>\n<blockquote><p>*nat<br \/>\n-A POSTROUTING -s 10.8.0.0\/24 -o eth0 -j MASQUERADE<\/p><\/blockquote>\n<p style=\"text-align: justify;\">\u041d\u0443 \u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432 OpenVPN \u0441\u0435\u0442\u044c<\/p>\n<blockquote><p>10.8.0.0\/24 dev awg0 scope link<\/p><\/blockquote>\n<h4 style=\"text-align: justify;\">3. \u0424\u0438\u043d\u0438\u0448<\/h4>\n<p style=\"text-align: justify;\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f OpenVPN \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c &#8212; \u0438 &#171;\u041c\u044b \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0437\u0430 \u043a\u043e\u0440\u0434\u043e\u043d\u043e\u043c. \u041b\u0438\u043d\u044f\u0442\u044c \u043d\u0430\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0442\u0438\u0445\u043e&#187;<\/p>\n<p style=\"text-align: justify;\">\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e <del>\u0432 \u0442\u0430\u043d\u043a\u0435<\/del> \u043d\u0435 \u043f\u043e\u043d\u044f\u043b \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: \u043a\u043b\u0438\u0435\u043d\u0442 OpenVPN \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <em>push &#171;redirect-gateway def1 bypass-dhcp&#187;<\/em> \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u043d\u0430 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0432 OpenVPN-\u0442\u0443\u043d\u043d\u0435\u043b\u044c. \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0410 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438 &#8212; \u0432\u0441\u0451, \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e \u0438\u0437 \u0441\u0435\u0442\u0438 OpenVPN, \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 100, \u0433\u0434\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 B \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 awg0. \u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 B \u0444\u0430\u0439\u0440\u0432\u043e\u043b\u043e\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f NAT-\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u043c\u0430\u0441\u043a\u0430\u0440\u0430\u0434\u0438\u043d\u0433 \u0442\u0440\u0430\u0444\u0438\u043a\u0430) \u0438\u0437 \u0441\u0435\u0442\u0438 OpenVPN \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/unlis.ru\/wp-content\/uploads\/2026\/07\/ebf9df6b-d68d-4a54-be6d-efef4d588eff.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-2667 aligncenter\" src=\"https:\/\/unlis.ru\/wp-content\/uploads\/2026\/07\/ebf9df6b-d68d-4a54-be6d-efef4d588eff-1024x683.png\" alt=\"\" width=\"734\" height=\"490\" srcset=\"https:\/\/unlis.ru\/wp-content\/uploads\/2026\/07\/ebf9df6b-d68d-4a54-be6d-efef4d588eff-1024x683.png 1024w, https:\/\/unlis.ru\/wp-content\/uploads\/2026\/07\/ebf9df6b-d68d-4a54-be6d-efef4d588eff-300x200.png 300w, https:\/\/unlis.ru\/wp-content\/uploads\/2026\/07\/ebf9df6b-d68d-4a54-be6d-efef4d588eff-768x512.png 768w, https:\/\/unlis.ru\/wp-content\/uploads\/2026\/07\/ebf9df6b-d68d-4a54-be6d-efef4d588eff-1170x780.png 1170w, https:\/\/unlis.ru\/wp-content\/uploads\/2026\/07\/ebf9df6b-d68d-4a54-be6d-efef4d588eff.png 1536w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u0430\u0441\u043a\u0430\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 VPN \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 Amnezia WireGuard 2.0 + \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 OpenVPN 0. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0421\u0435\u0440\u0432\u0435\u0440 \u0410: Debian 13. \u041c\u0435\u0441\u0442\u043e\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435: &#171;\u0422\u0443\u0442&#187; OpenVPN + PKI + \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u0434\u0441\u0435\u0442\u044c 10.8.0.0\/24 \u041a\u043b\u0438\u0435\u043d\u0442 Amnezia Wireguard \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f policy-based&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/unlis.ru\/?p=2644\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[14,15,147,148],"class_list":["post-2644","post","type-post","status-publish","format-standard","hentry","category-computers","tag-debian","tag-linux","tag-vpn","tag-148"],"_links":{"self":[{"href":"https:\/\/unlis.ru\/index.php?rest_route=\/wp\/v2\/posts\/2644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unlis.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unlis.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unlis.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unlis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2644"}],"version-history":[{"count":17,"href":"https:\/\/unlis.ru\/index.php?rest_route=\/wp\/v2\/posts\/2644\/revisions"}],"predecessor-version":[{"id":2670,"href":"https:\/\/unlis.ru\/index.php?rest_route=\/wp\/v2\/posts\/2644\/revisions\/2670"}],"wp:attachment":[{"href":"https:\/\/unlis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unlis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unlis.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}