<?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 Terminal</title><link>https://muisti.atk-neuvos.fi/tags/wireguard/</link><description>Recent content in Wireguard on Terminal</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 09 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://muisti.atk-neuvos.fi/tags/wireguard/index.xml" rel="self" type="application/rss+xml"/><item><title>Wireguard VPN networking</title><link>https://muisti.atk-neuvos.fi/posts/wireguard/</link><pubDate>Mon, 09 Nov 2026 00:00:00 +0000</pubDate><guid>https://muisti.atk-neuvos.fi/posts/wireguard/</guid><description>&lt;h1 id="background"&gt;Background&lt;/h1&gt;
&lt;p&gt;As easier or ad-hoc VPN solution to openvpn, wireguard provides user space tools for point-to-point networking with roaming clients.&lt;/p&gt;
&lt;p&gt;One static public host is needed.&lt;/p&gt;
&lt;h1 id="network-topology"&gt;Network topology&lt;/h1&gt;
&lt;h2 id="server"&gt;Server&lt;/h2&gt;
&lt;p&gt;Any publicly reachable host with optional DNS name.&lt;/p&gt;
&lt;p&gt;It also has private address 172.16.0.1 for WG interface.&lt;/p&gt;
&lt;h2 id="roaming-peer-1"&gt;Roaming peer 1&lt;/h2&gt;
&lt;p&gt;Using any network anywhere.
WG address is 172.16.0.2&lt;/p&gt;
&lt;h1 id="package-setup-for-all-hosts"&gt;Package setup for all hosts&lt;/h1&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;sudo apt install wireguard-tools
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="key-generation"&gt;Key generation&lt;/h1&gt;
&lt;h2 id="server-1"&gt;Server&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wg genkey &amp;gt;/root/wg/srv.key
wg pubkey &amp;lt;/root/wg/srv.key &amp;gt;/root/wg/srv.pub
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="peer-1"&gt;Peer 1&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wg genkey &amp;gt;/root/wg/stinky.key
wg pubkey &amp;lt;/root/wg/stinky.key &amp;gt;/root/wg/stinky.pub
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="server-setup"&gt;Server setup&lt;/h1&gt;
&lt;h2 id="allow-traffic-at-udp12345"&gt;Allow traffic at udp/12345&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;ufw allow udp/12345 comment &amp;#39;wireguard&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="public-server-config"&gt;Public server config&lt;/h2&gt;
&lt;p&gt;The peer key below is stinky.pub contents&lt;/p&gt;</description></item></channel></rss>