<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>wireguard &amp;mdash; Jerry of the Week</title>
    <link>https://write.in0rdr.ch/tag:wireguard</link>
    <description>ˈdʒɛri - Individual who sends life against the grain no matter the consequences</description>
    <pubDate>Fri, 18 Sep 2026 10:25:09 +0000</pubDate>
    <item>
      <title>HAProxy ingress with Wireguard</title>
      <link>https://write.in0rdr.ch/haproxy-ingress-with-wireguard</link>
      <description>&lt;![CDATA[Recently I switched my homelab ingress from an implementation with autossh reverse proxy to Wireguard.&#xA;&#xA;#wireguard #haproxy #homelab&#xA;!--more--&#xA;&#xA;Up until today I had an SSH reverse proxy (autossh) running for routing traffic from the Internet to my applications in the homelab. That was a poor mans solution which worked fine for most of the time. See Slide 6.&#xA;&#xA;After reading Thibaults blog post A cheap VPS is a good front I decided to ditch the SSH reverse proxy in favor of a proper Wireguard connection.&#xA;&#xA;As in the previous implementation, the ingress network traffic flows through a jumphost in the cloud. I still use the Oracle cloud free tier, it works reliably for my purposes.&#xA;&#xA;To accept the network traffic on the jumphost, I installed a second HAProxy instance, which does simple &#34;tcp passthrough&#34; to the actual router (also a HAProxy, on LXC) in the internal network.&#xA;&#xA;The amd64 node on the internal network is the “Wireguard client peer”&#xA;The jumphost on Oracle Cloud is the “Wireguard server peer”&#xA;&#xA;haproxy-wireguard.jpg&#xA;&#xA;I have PersistentKeepalive setup with 25 seconds as suggested to keep the tunnel alive. Wireguard connection is established from the internal network to the jumphost, as was the case for the SSH reverse proxy.&#xA;&#xA;Jumphost HAProxy example config:&#xA;backend haproxylanhttp&#xA;    server               haproxy $wg0:80 check send-proxy-v2&#xA;backend haproxylanhttps&#xA;    server               haproxy $wg0:443 check send-proxy-v2&#xA;backend haproxylanssh&#xA;    server               haproxy $wg0:22 check send-proxy-v2&#xA;&#xA;LXC HAProxy example config (internal network):&#xA;frontend httpfront&#xA;    bind                 :80 accept-proxy&#xA;    ...&#xA;frontend httpsfront&#xA;    bind                 :443 accept-proxy&#xA;    ...&#xA;frontend sshfront&#xA;    bind                 :22 accept-proxy&#xA;&#xA;The proxy protocol allows me to see the real/original IP in the Anubis logs.&#xA;&#xA;Instead of connecting the jumphost with the internal network via SSH reverse proxy (autossh), I now route the ingress through the Wireguard overlay network. I create Wirguard keypairs for each relevant node to establish connections.&#xA;&#xA;I hope these kind of descriptions encourage you on your own self-hosting and homelab journeys 😁&#xA;&#xA;div style=&#34;text-align:center; font-size: 0.8em&#34;&#xD;&#xA;a href=&#34;https://write.in0rdr.ch/feed&#34;&amp;#128732; RSS/a | a href=&#34;https://m.in0rdr.ch/in0rdr&#34;&amp;#128024; Fediverse/a | a href=&#34;https://chat.in0rdr.ch/#/guest?join=p0c@conference.in0rdr.ch&#34;&amp;#128172; XMPP/a&#xD;&#xA;/div]]&gt;</description>
      <content:encoded><![CDATA[<p>Recently I switched my homelab ingress from an implementation with autossh reverse proxy to Wireguard.</p>

<p><a href="https://write.in0rdr.ch/tag:wireguard" class="hashtag"><span>#</span><span class="p-category">wireguard</span></a> <a href="https://write.in0rdr.ch/tag:haproxy" class="hashtag"><span>#</span><span class="p-category">haproxy</span></a> <a href="https://write.in0rdr.ch/tag:homelab" class="hashtag"><span>#</span><span class="p-category">homelab</span></a>
</p>

<p>Up until today I had an SSH reverse proxy (autossh) running for routing traffic from the Internet to my applications in the homelab. That was a poor mans solution which worked fine for most of the time. See <a href="https://code.in0rdr.ch/pub/impacthub/sess2/techradar-2-homelab.pdf">Slide 6</a>.</p>

<p>After reading Thibaults blog post <a href="https://ergaster.org/thoughts/front-server">A cheap VPS is a good front</a> I decided to ditch the SSH reverse proxy in favor of a proper Wireguard connection.</p>

<p>As in the previous implementation, the ingress network traffic flows through a jumphost in the cloud. I still use the <a href="https://www.oracle.com/cloud/free">Oracle cloud free tier</a>, it works reliably for my purposes.</p>

<p>To accept the network traffic on the jumphost, I installed a second HAProxy instance, which does simple “tcp passthrough” to the actual router (also a HAProxy, on LXC) in the internal network.</p>
<ul><li>The amd64 node on the internal network is the “Wireguard client peer”</li>
<li>The jumphost on Oracle Cloud is the “Wireguard server peer”</li></ul>

<p><img src="https://code.in0rdr.ch/pub/blog/haproxy-wireguard.jpg" alt="haproxy-wireguard.jpg"></p>

<p>I have <a href="https://www.wireguard.com/quickstart/#nat-and-firewall-traversal-persistence">PersistentKeepalive</a> setup with 25 seconds as suggested to keep the tunnel alive. Wireguard connection is established from the internal network to the jumphost, as was the case for the SSH reverse proxy.</p>

<p>Jumphost HAProxy example config:</p>

<pre><code>backend haproxy_lan_http
    server               haproxy $wg0:80 check send-proxy-v2
backend haproxy_lan_https
    server               haproxy $wg0:443 check send-proxy-v2
backend haproxy_lan_ssh
    server               haproxy $wg0:22 check send-proxy-v2
</code></pre>

<p>LXC HAProxy example config (internal network):</p>

<pre><code>frontend httpfront
    bind                 :80 accept-proxy
    ...
frontend httpsfront
    bind                 :443 accept-proxy
    ...
frontend sshfront
    bind                 :22 accept-proxy
</code></pre>

<p>The <a href="https://www.haproxy.com/documentation/haproxy-configuration-tutorials/proxying-essentials/client-ip-preservation/enable-proxy-protocol/">proxy protocol</a> allows me to see the <a href="https://anubis.techaro.lol/docs/admin/caveats-xff">real/original IP</a> in the Anubis logs.</p>

<p>Instead of connecting the jumphost with the internal network via SSH reverse proxy (autossh), I now route the ingress through the Wireguard overlay network. I create Wirguard keypairs for each relevant node to establish connections.</p>

<p>I hope these kind of descriptions encourage you on your own self-hosting and homelab journeys 😁</p>

<div style="text-align:center; font-size: 0.8em">
<a href="https://write.in0rdr.ch/feed">🛜 RSS</a> | <a href="https://m.in0rdr.ch/in0rdr">🐘 Fediverse</a> | <a href="https://chat.in0rdr.ch/#/guest?join=p0c@conference.in0rdr.ch">💬 XMPP</a>
</div>
]]></content:encoded>
      <guid>https://write.in0rdr.ch/haproxy-ingress-with-wireguard</guid>
      <pubDate>Fri, 18 Sep 2026 04:57:48 +0000</pubDate>
    </item>
  </channel>
</rss>