<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Networking on Sysadmin Tales</title>
    <link>https://blog.ssb-tech.net/tags/networking/</link>
    <description>Recent content in Networking on Sysadmin Tales</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 02 Oct 2026 21:39:10 -0400</lastBuildDate>
    <atom:link href="https://blog.ssb-tech.net/tags/networking/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Routing to Tailscale clients from a local network with OPNSense</title>
      <link>https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/</link>
      <pubDate>Sat, 15 Aug 2026 16:45:12 -0400</pubDate>
      <guid>https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;Effectively, what we&amp;rsquo;re trying to accomplish here today is the opposite of a Tailscale &lt;a href=&#34;https://tailscale.com/docs/features/subnet-routers&#34;&gt;Subnet Router&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;As in, allowing clients on our local network to talk to devices via their &lt;a href=&#34;https://tailscale.com/docs/concepts/tailscale-ip-addresses&#34;&gt;Tailscale subnet IP addresses&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When I started looking into how to do this, I could not find a complete guide on the topic.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll do my best to do this start to finish so that anyone else can follow along with me.&lt;/p&gt;&#xA;&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;You already have an OPNSense gateway setup and enabled as a Subnet Router on your Tailnet.&lt;/li&gt;&#xA;&lt;li&gt;You&amp;rsquo;ll also need to have approved the subnets that you told the Subnet Router to advertise in your admin console.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;recommendations&#34;&gt;Recommendations&lt;/h2&gt;&#xA;&lt;p&gt;Create an alias for the Tailscale subnet range so you can avoid typing it in 10x times.&lt;/p&gt;&#xA;&lt;p&gt;Firewall &amp;gt; Aliases&lt;/p&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;Showing alias for tailscale subnet&#34; loading=&#34;lazy&#34; src=&#34;https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/images/tailscale-alias.png&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;explanation&#34;&gt;Explanation&lt;/h2&gt;&#xA;&lt;p&gt;Tailscale Subnet Routers by default use SNAT (Source NAT).&lt;/p&gt;&#xA;&lt;p&gt;This means that packets sent from your Tailscale devices &lt;em&gt;to&lt;/em&gt; the Subnet Router will go through Network Address Translation on their way to the local subnets you&amp;rsquo;ve advertised.&lt;/p&gt;&#xA;&lt;p&gt;So, any devices &lt;em&gt;inside&lt;/em&gt; your LAN by default will only ever see the IP address of your OPNSense gateway - they will not see the IP addresses of the individual Tailscale clients. This is the first thing that we will need to disable.&lt;/p&gt;&#xA;&lt;p&gt;Once we have this disabled, we&amp;rsquo;ll need to configure both a static route as well as firewall rules to allow the traffic to pass.&lt;/p&gt;&#xA;&lt;h2 id=&#34;step-by-step&#34;&gt;Step by step&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Log into your OPNSense router and navigate to VPN &amp;gt; Tailscale &amp;gt; Settings. You&amp;rsquo;ll need to toggle on &amp;ldquo;Advanced Mode&amp;rdquo;. Check the box for &amp;ldquo;Disable SNAT&amp;rdquo;.&#xA;&lt;img alt=&#34;Image showing how to disable SNAT in Tailscale&#34; loading=&#34;lazy&#34; src=&#34;https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/images/tailscale-disable-snat.png&#34;&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Now, what we need to do is create a static route - but before we can do that, we need to take care of some other items:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add the Tailscale interface by going to Interfaces &amp;gt; Assignments. Click on the + button and add the Tailscale interface from the dropdown. Don&amp;rsquo;t forget to enable the interface - by default it will be added in a disabled state.&#xA;&lt;img alt=&#34;Tailscale interface in OPNSense&#34; loading=&#34;lazy&#34; src=&#34;https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/images/tailscale-interface.png&#34;&gt;&#xA;&lt;img alt=&#34;Tailscale interface configuration&#34; loading=&#34;lazy&#34; src=&#34;https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/images/tailscale-interface-2.png&#34;&gt;&lt;/li&gt;&#xA;&lt;li&gt;Create a new gateway - System &amp;gt; Gateways &amp;gt; Configuration. The interface should be &amp;ldquo;Tailscale&amp;rdquo;. Gateway name is technically arbitrary, but for the sake of simplicity I&amp;rsquo;ve also called it &amp;ldquo;Tailscale&amp;rdquo;. Make sure you disable gateway monitoring.&#xA;&lt;img alt=&#34;Tailscale Gateway setup&#34; loading=&#34;lazy&#34; src=&#34;https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/images/tailscale-gateway.png&#34;&gt;&lt;/li&gt;&#xA;&lt;li&gt;Now that we&amp;rsquo;ve done this, we can finally define our static route (System &amp;gt; Routes &amp;gt; Configuration). The Tailscale subnet is 100.64.0.0/10:&#xA;&lt;img alt=&#34;Tailscale static route configuration page&#34; loading=&#34;lazy&#34; src=&#34;https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/images/tailscale-route.png&#34;&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Now that we have the routing taken care of, we need to create some firewall rules to allow the traffic to pass. You&amp;rsquo;ll need to create at minimum 2 rules on the OPNSense side (Firewall &amp;gt; Rules):&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;On your LAN interface, define a rule that allows communication from your LAN to your Tailnet. For example -&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Interface: LAN (Or whatever yours is called)&#xA;Action: Pass&#xA;Source: LAN network&#xA;Destination: 100.64.0.0/10&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;On your Tailscale interface, define the inverse:&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Interface: Tailscale&#xA;Action: Pass&#xA;Source: 100.64.0.0/10&#xA;Destination: LAN network&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Rule 1 may not be needed if you have the default &amp;ldquo;Allow All&amp;rdquo; rule in your configuration on the LAN interface. I do not, so I needed to allow that traffic.&lt;/p&gt;&#xA;&lt;p&gt;Feel free to restrict this traffic however you would like. Personally, I only allow through a few kinds of traffic - DNS, HTTP/HTTPS, and ICMP echo-request / echo-reply.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;You&amp;rsquo;ll also need to go into your &lt;a href=&#34;https://console.tailscale.com/admin/acls/visual/general-access-rules&#34;&gt;Tailscale ACL controls&lt;/a&gt; and allow access there from your local subnets.&#xA;&lt;img alt=&#34;Tailscale ACL screenshot&#34; loading=&#34;lazy&#34; src=&#34;https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/images/tailscale-acl.png&#34;&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Any device that you wish to reach via this connection needs to have the &lt;code&gt;--accept-routes&lt;/code&gt; option enabled when you run &lt;code&gt;tailscale up&lt;/code&gt;. The device you&amp;rsquo;re trying to access needs to have a route to get &lt;em&gt;back&lt;/em&gt; to your LAN subnet, after all.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;--accept-routes&lt;/code&gt; is enabled by default on MacOS and Windows, but disabled by default on Linux. Once enabled, the device should be reachable from any device on your LAN.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;You may also want to configure MSS clamping to avoid unnecessary IP fragmentation. Under Firewall &amp;gt; Settings &amp;gt; Normalization, click the + to add a new rule:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Interface: Select your assigned Tailscale interface.&#xA;Direction: Any&#xA;Max MSS: 1240 (for standard Tailscale 1280 MTU) or 1380 (if your Tailnet uses 1420 MTU).&#xA;Description: Clamp MSS for Tailscale traffic.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I highly recommend thinking carefully about your firewall rules and Tailscale ACLs, and what you allow to connect to what.&lt;/p&gt;&#xA;&lt;p&gt;Now that I&amp;rsquo;ve gotten this working I&amp;rsquo;ll be spending some time narrowing my LAN to Tailnet access ACL down to specific tags. But that&amp;rsquo;s a whole other post.&lt;/p&gt;&#xA;&lt;h2 id=&#34;exit-node&#34;&gt;Exit Node&lt;/h2&gt;&#xA;&lt;p&gt;If, like me, you are also using your home OPNSense gateway as a Tailscale &lt;a href=&#34;https://tailscale.com/docs/features/exit-nodes&#34;&gt;Exit Node&lt;/a&gt;, you&amp;rsquo;ll quickly realize that this process broke it.&lt;/p&gt;&#xA;&lt;p&gt;The fix is simple, we need to add an Outbound NAT rule to replace the missing SNAT on the Tailscale service.&lt;/p&gt;&#xA;&lt;p&gt;Go to Firewall &amp;gt; NAT &amp;gt; Outbound.&lt;/p&gt;&#xA;&lt;p&gt;Your Outbound NAT mode must be set to &amp;ldquo;Hybrid&amp;rdquo; or &amp;ldquo;Manual&amp;rdquo;. If you don&amp;rsquo;t know what this means, set it to &amp;ldquo;Hybrid&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;Configure a rule that looks like this:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Interface: WAN&#xA;Source address: 100.64.0.0/10&#xA;Destination address: any&#xA;Translation target: Interface address&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img alt=&#34;Example of outbound NAT rule&#34; loading=&#34;lazy&#34; src=&#34;https://blog.ssb-tech.net/posts/opnsense-lan-to-tailscale-connectivity/images/tailscale-nat.png&#34;&gt;.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Fluxer Over Tailscale</title>
      <link>https://blog.ssb-tech.net/posts/fluxer-over-tailscale/</link>
      <pubDate>Sat, 20 Jun 2026 21:36:21 -0400</pubDate>
      <guid>https://blog.ssb-tech.net/posts/fluxer-over-tailscale/</guid>
      <description>&lt;p&gt;This weekend I&amp;rsquo;ve been playing with setting up a self-hosted &lt;a href=&#34;https://fluxer.app&#34;&gt;Fluxer&lt;/a&gt; instance.&lt;/p&gt;&#xA;&lt;p&gt;In my traditional fashion, I made things much harder by myself by refusing to use their provided Caddy setup, and instead using Traefik.&lt;/p&gt;&#xA;&lt;p&gt;And for an additional challenge - I wanted this to be completely inaccessible from the public Internet, instead using my Tailscale mesh network.&lt;/p&gt;&#xA;&lt;p&gt;The setup required some heavy modifications to the Docker Compose file provided by Fluxer&amp;rsquo;s team, and a few tweaks to &lt;code&gt;livekit.yaml&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;callout callout-note&#34; role=&#34;note&#34;&gt;&lt;div class=&#34;callout-title&#34;&gt;Note&lt;/div&gt;&lt;div class=&#34;callout-content&#34;&gt;The Docker Compose file for this service is extremely long, so instead of posting it inline here as I normally do, I have created this &lt;a href=&#34;https://gist.github.com/BladeWDR/1b062af5eede7e0c46a3446d46b4f889&#34;&gt;Gist&lt;/a&gt; containing both the modified Compose project and &lt;code&gt;livekit.yaml&lt;/code&gt;.&lt;/div&gt;&lt;/div&gt;&#xA;&lt;p&gt;With this setup, I&amp;rsquo;m able to access Fluxer at &lt;code&gt;fluxer.mytailnet.ts.net&lt;/code&gt; with full TLS encryption and valid certificates.&lt;/p&gt;&#xA;&lt;p&gt;I am using:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A Tailscale sidecar container&lt;/li&gt;&#xA;&lt;li&gt;The Tailscale Traefik provider for TLS certificates&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Effectively, what you need to do is tell Traefik and the Livekit service to share the Tailscale container&amp;rsquo;s network namespace.&lt;/p&gt;&#xA;&lt;p&gt;Then we tell Livekit to advertise the Tailscale container&amp;rsquo;s IP address instead of the one for the Docker bridge (see &lt;code&gt;livekit.yaml&lt;/code&gt;, it&amp;rsquo;s the &lt;code&gt;node_ip&lt;/code&gt; setting).&lt;/p&gt;&#xA;&lt;p&gt;Note - you&amp;rsquo;ll need to add the &lt;code&gt;TS_SOCKET: /var/run/tailscale/tailscaled.sock&lt;/code&gt; environment variable to the Tailscale container, and pass the Tailscale socket through to the Traefik container - it needs access to the Tailscale daemon to be able to grab your certificates.&lt;/p&gt;&#xA;&lt;p&gt;You&amp;rsquo;ll also need to have &lt;a href=&#34;https://tailscale.com/docs/how-to/set-up-https-certificates&#34;&gt;enabled HTTPS on your Tailnet&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;What works&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Text chat&lt;/li&gt;&#xA;&lt;li&gt;Voice chat&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;What doesn&amp;rsquo;t work (yet)&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Video chat - I think this has something to do with Livekit video codecs. I need to play a bit more with this and do some more testing.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
    </item>
    <item>
      <title>Wireguard configuration concepts</title>
      <link>https://blog.ssb-tech.net/posts/on-wireguard/</link>
      <pubDate>Sun, 26 Oct 2025 15:04:55 -0400</pubDate>
      <guid>https://blog.ssb-tech.net/posts/on-wireguard/</guid>
      <description>&lt;h1 id=&#34;wireguard-concepts&#34;&gt;Wireguard concepts&lt;/h1&gt;&#xA;&lt;h2 id=&#34;the-point-of-this-post&#34;&gt;The point of this post&lt;/h2&gt;&#xA;&lt;p&gt;This is intended as a high level starting point for someone who is new to using Wireguard.&lt;/p&gt;&#xA;&lt;p&gt;If you spot any errors or inaccuracies, feel free to open a pull request in the &lt;a href=&#34;https://github.com/bladewdr/ssb-tech-blog&#34;&gt;Github repo&lt;/a&gt;, or leave a comment.&lt;/p&gt;&#xA;&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.wireguard.com/&#34;&gt;Wireguard&lt;/a&gt; is a modern VPN protocol.&lt;/p&gt;&#xA;&lt;p&gt;Instead of using a traditional client server model, Wireguard uses a peer-to-peer mechanism. Authentication is handled with private and public key pairs, and optionally a pre-shared key.&lt;/p&gt;&#xA;&lt;h2 id=&#34;wireguard-configuration-on-linux&#34;&gt;Wireguard configuration on Linux&lt;/h2&gt;&#xA;&lt;p&gt;There are many ways to configure Wireguard on Linux, but the one that I typically use is by setting up a file in &lt;code&gt;/etc/wireguard&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;On Linux, this is the default location that the &lt;code&gt;wg-quick&lt;/code&gt; userspace utility looks for Wireguard interface configurations.&lt;/p&gt;&#xA;&lt;p&gt;The interface configuration can contain both the definition for the interface as well as any peers.&lt;/p&gt;&#xA;&lt;h3 id=&#34;anatomy-of-the-wireguard-configuration-file&#34;&gt;Anatomy of the Wireguard configuration file&lt;/h3&gt;&#xA;&lt;p&gt;Consider the following configuration file: &lt;code&gt;/etc/wireguard/demo.conf&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When using &lt;code&gt;wg-quick&lt;/code&gt;, the interface name will be generated from the name of the configuration file. In this case, the interface name would be &lt;code&gt;demo&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Sample configuration file:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Interface]&#xA;&#xA;Address = 192.168.99.5/24&#xA;PrivateKey = 2COm4EMxP5tcF9cpgCxBAsSGRwrjoMmWjkr+emGtylY=&#xA;ListenPort = 51820&#xA;&#xA;[Peer]&#xA;&#xA;PublicKey = Tlm3payEVQWCj7GK7Y7usejF4mix5FBULZryxfu9kxY=&#xA;PreSharedKey = chooseabetterkey&#xA;AllowedIPs = 192.168.99.8/32,10.10.33.0/24&#xA;Endpoint = demo.wireguard.com:51820&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Lets break down this config file into its components.&lt;/p&gt;&#xA;&lt;p&gt;Wireguard uses an INI-like syntax.&lt;/p&gt;&#xA;&lt;p&gt;There are 2 top level blocks that can be configured, &lt;code&gt;[Interface]&lt;/code&gt; and &lt;code&gt;[Peer]&lt;/code&gt;. There can be multiple &lt;code&gt;[Peer]&lt;/code&gt; definitions, but only one &lt;code&gt;[Interface]&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h4 id=&#34;the-interface-block&#34;&gt;The Interface Block&lt;/h4&gt;&#xA;&lt;dl&gt;&#xA;&lt;dt&gt;&lt;strong&gt;Address&lt;/strong&gt;&lt;/dt&gt;&#xA;&lt;dd&gt;What address do you want this particular peer to have? Make sure you set the correct CIDR notation for your subnet size. This one is &lt;code&gt;/24&lt;/code&gt; for a 254 address subnet.&lt;/dd&gt;&#xA;&lt;dt&gt;&lt;strong&gt;PrivateKey&lt;/strong&gt;&lt;/dt&gt;&#xA;&lt;dd&gt;The private key is a secret! I&amp;rsquo;ve generated this one just for this demo, it will be discarded after.&lt;/dd&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;But make sure you secure these properly!&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dt&gt;&lt;strong&gt;ListenPort&lt;/strong&gt;&lt;/dt&gt;&#xA;&lt;dd&gt;The default listen port is 51820, but you can set it to anything you want. This is the network port that Wireguard will use to listen on this interface.&lt;/dd&gt;&#xA;&lt;/dl&gt;&#xA;&lt;h4 id=&#34;the-peer-block&#34;&gt;The Peer Block&lt;/h4&gt;&#xA;&lt;dl&gt;&#xA;&lt;dt&gt;&lt;strong&gt;PublicKey&lt;/strong&gt;&lt;/dt&gt;&#xA;&lt;dd&gt;This is the public key associated with the &lt;em&gt;peer&amp;rsquo;s&lt;/em&gt; private key, &lt;em&gt;not&lt;/em&gt; the private key of this interface.&lt;/dd&gt;&#xA;&lt;dt&gt;&lt;strong&gt;PreSharedKey&lt;/strong&gt;&lt;/dt&gt;&#xA;&lt;dd&gt;Preshared keys are optional but good for additional security. This is a key that needs to match on both sides of the connection.&lt;/dd&gt;&#xA;&lt;dt&gt;&lt;strong&gt;AllowedIPs&lt;/strong&gt;&lt;/dt&gt;&#xA;&lt;dd&gt;The AllowedIPs stanza is an interesting one. It is what Wireguard uses to make internal routing decisions, but those packets need to arrive at the Wireguard interface first.&lt;/dd&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;This is the reason I like to use wg-quick to set up my interfaces - if you don&amp;rsquo;t, you&amp;rsquo;ll need to add the routes yourself. This is personal preference.&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;The configuration above would allow this peer to have the 192.168.99.8 IP on the Wireguard internal subnet, and any traffic destined for 10.10.33.0/24 would also get passed along.&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;Note how I&amp;rsquo;m using &lt;code&gt;/32&lt;/code&gt; for the Wireguard internal subnet here. This is because I only want that &lt;em&gt;one&lt;/em&gt; IP to be valid for this peer. The subnet is still a &lt;code&gt;/24&lt;/code&gt; as configured on the interface itself.&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dt&gt;&lt;strong&gt;Endpoint&lt;/strong&gt;&lt;/dt&gt;&#xA;&lt;dd&gt;Endpoint is technically an optional field.&lt;/dd&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;But it does need to be set on at least one side of each connection.&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;At least one of the peers needs to have a public IP address that&amp;rsquo;s reachable on the internet. (And the &lt;code&gt;ListenPort&lt;/code&gt; needs to be open.)&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;/dl&gt;&#xA;&lt;p&gt;There are other stanzas that can be used in the configuration file, but these are the basic ones.&lt;/p&gt;&#xA;&lt;p&gt;You can see the &lt;a href=&#34;https://www.man7.org/linux/man-pages/man8/wg.8.html&#34;&gt;wg&lt;/a&gt; and &lt;a href=&#34;https://www.man7.org/linux/man-pages/man8/wg-quick.8.html&#34;&gt;wg-quick&lt;/a&gt; man pages for more information on configuration file syntax.&lt;/p&gt;&#xA;&lt;h3 id=&#34;using-wg-quick-with-systemd&#34;&gt;Using wg-quick with systemd&lt;/h3&gt;&#xA;&lt;p&gt;When installing Wireguard on Linux, it comes with a template &lt;a href=&#34;https://en.wikipedia.org/wiki/Systemd&#34;&gt;systemd&lt;/a&gt; unit file for &lt;code&gt;wg-quick&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This is a wrapper that allows you to quickly set Wireguard configurations that load at startup.&lt;/p&gt;&#xA;&lt;p&gt;To start up our config file from earlier using wg-quick, you can do it like so:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl start wg-quick@demo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Where the text after the &lt;code&gt;@&lt;/code&gt; symbol will always been the config file name without its &lt;code&gt;.conf&lt;/code&gt; extension. For more info on this, see the &lt;a href=&#34;https://wiki.archlinux.org/title/Systemd#Using_units&#34;&gt;Arch Wiki page on systemd&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If you want to make the configuration start at boot, you can enable the systemd unit.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl enable wg-quick@demo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;callout callout-note&#34; role=&#34;note&#34;&gt;&lt;div class=&#34;callout-title&#34;&gt;Note&lt;/div&gt;&lt;div class=&#34;callout-content&#34;&gt;Yes, you can have multiple Wireguard interfaces on one machine. Just make sure that they listen on different ports.&lt;/div&gt;&lt;/div&gt;&#xA;&lt;h2 id=&#34;general-usage-notes&#34;&gt;General usage notes&lt;/h2&gt;&#xA;&lt;p&gt;While Wireguard as a protocol is peer-to-peer, many people do still use it in a client-server architecture.&lt;/p&gt;&#xA;&lt;p&gt;One use case for this is if you&amp;rsquo;re using Wireguard to set up your own privacy VPN endpoint.&lt;/p&gt;&#xA;&lt;div class=&#34;callout callout-note&#34; role=&#34;note&#34;&gt;&lt;div class=&#34;callout-title&#34;&gt;Note&lt;/div&gt;&lt;div class=&#34;callout-content&#34;&gt;If you do use Wireguard as a VPN server, remember that you also need to enable &lt;a href=&#34;https://askubuntu.com/questions/311053/how-to-make-ip-forwarding-permanent&#34;&gt;IP forwarding&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&#xA;</description>
    </item>
    <item>
      <title>PSA: Unifi IPSec site-to-site tunnels and DHCP</title>
      <link>https://blog.ssb-tech.net/posts/unifi-ipsec-and-dhcp/</link>
      <pubDate>Tue, 01 Apr 2025 13:09:28 -0400</pubDate>
      <guid>https://blog.ssb-tech.net/posts/unifi-ipsec-and-dhcp/</guid>
      <description>&lt;p&gt;Bit of a PSA of sorts, as this is the second time that I have run into this particular issue.&lt;/p&gt;&#xA;&lt;p&gt;Scenario: You had a Unifi gateway such as a UDM Pro with a static IP address. You switched your WAN IP from static to dynamic, for whatever reason. (In my case it was a different ISP that doesn&amp;rsquo;t hand out actual static IPs, only DHCP reservations.)&lt;/p&gt;&#xA;&lt;p&gt;You may find that the router holds onto that old IP, and if you&amp;rsquo;re like me, you&amp;rsquo;ll be confused as hell.&lt;/p&gt;&#xA;&lt;p&gt;The cause is your IPSec site-to-site tunnel.&lt;/p&gt;&#xA;&lt;p&gt;You&amp;rsquo;ll need to make note of any settings it had (Pre-shared keys, remote endpoints, remote subnets, etc), delete the tunnel completely, and then once you&amp;rsquo;ve successfully gotten your new IP from DHCP, recreate the tunnel from scratch.&lt;/p&gt;&#xA;&lt;p&gt;Once you remove the tunnel, you should get an IP from DHCP almost immediately.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Adventures in DNS (But it&#39;s actually DHCP this time.)</title>
      <link>https://blog.ssb-tech.net/posts/adventures-in-dhcp-and-dns/</link>
      <pubDate>Mon, 02 Dec 2024 23:57:12 -0500</pubDate>
      <guid>https://blog.ssb-tech.net/posts/adventures-in-dhcp-and-dns/</guid>
      <description>&lt;p&gt;So, story time.&lt;/p&gt;&#xA;&lt;p&gt;Boss has a friend who does IT for an electrical contractor 30 mins or so away from our primary office, and he brings us in because he’s having DNS issues he can’t figure out&lt;/p&gt;&#xA;&lt;p&gt;Get onsite there and go over his setup – typical mess of a network closet with no brand consistency and mismatched patch cables, whatever. Otherwise looks good from a network perspective.&lt;/p&gt;&#xA;&lt;p&gt;However, he mentions that he has no access to the firewall since it’s owned by the ISP.&lt;/p&gt;&#xA;&lt;p&gt;Personally, I would have been on top of the ISP until they either gave me the ability to log into that thing, or had them put it in bridge mode and installed my own firewall. I do not like and do not trust any firewall that I do not control. Sorry, it&amp;rsquo;s just the paranoid sysadmin in me.&lt;/p&gt;&#xA;&lt;p&gt;So we finally start looking at the problem and the issue is that he keeps having to hardcode his DNS settings and he’s having weird WiFi connectivity issues. Everything points to DHCP not setting the DNS settings consistently… which made me suspect a rogue DHCP server.&lt;/p&gt;&#xA;&lt;p&gt;So I connect my laptop and run an ifconfig – and I see that DHCP is coming from some IP address 10.0.0.69. Knowing at this point he didn’t have access to the firewall, I asked him if that was one of his servers, he says no. I asked him where he WAS running DHCP, and was told it was on one of the domain controllers, but he didn’t remember which one. Red flag #1.&lt;/p&gt;&#xA;&lt;p&gt;I do an nmap scan to see if I can grab the vendor of the device that has that IP – it reports back that it’s from Axis Communications. Not being familiar with it, I asked about that vendor, and was told that that was the brand of their security cameras and NVR.&lt;/p&gt;&#xA;&lt;p&gt;I go okay, so there’s your problem right there. You have 2 DHCP servers, and it’s a question of which one responds first to the DHCPDISCOVER broadcast.&lt;/p&gt;&#xA;&lt;p&gt;So we go look at the cameras – no passwords for ANYTHING. we lucked into finding the password for the computer controlling them written on a piece of paper near the rack it was installed in.&lt;/p&gt;&#xA;&lt;p&gt;Eventually I figured out that one of the cameras had DHCP running, and we turned it off, but then we tried getting a new DHCP lease – it got one, but in the wrong subnet entirely.&lt;/p&gt;&#xA;&lt;p&gt;This of course, understandably confuses me. I noticed that the DHCP server is now 192.168.0.1, which isn’t even the right subnet. What the deuce?&lt;/p&gt;&#xA;&lt;p&gt;Ran another network scan, that IP has the same vendor as before, but a different MAC address now, so it’s a totally different device.&lt;/p&gt;&#xA;&lt;p&gt;Turns out, the appliance they have running their cameras? it’s 2 devices in one – a windows PC acting as the controller, and the built in switch which has its own DHCP server (and presumably it’s own operating system and mainboard).&lt;/p&gt;&#xA;&lt;p&gt;Of course, no password for that either, so I Googled and found it’s on a sticker on the bottom of the unit. I found the password, logged in and turned off DHCP. That’s it, right? We’ve fixed it?&lt;/p&gt;&#xA;&lt;p&gt;Tried to get a lease once more… nothing happens at all.&lt;/p&gt;&#xA;&lt;p&gt;Turns out… he was NOT running DHCP on the domain controller. Or anywhere except for this NVR, that had it turned on by default.&lt;/p&gt;&#xA;&lt;p&gt;I installed the DHCP role on one of the domain controllers and configured it with the proper settings, and a reasonable scope, along with primary and secondary DNS for their domain. Did another ipconfig /renew on one of their machines and… success! We got an IP in the correct subnet, and it is assigning the correct DNS servers to the client machines. WiFi works perfectly as well!&lt;/p&gt;&#xA;&lt;p&gt;How the network got into this state and stayed operational for as long as it did? Who can say? Miracles happen every day, right?&lt;/p&gt;&#xA;&lt;p&gt;Like they say, it’s always DNS. But sometimes it’s not DNS, sometimes it’s badly misconfigured DHCP.&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
