<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fatih Şennik</title>
    <description>The latest articles on DEV Community by Fatih Şennik (@fatihsennik).</description>
    <link>https://dev.to/fatihsennik</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3927101%2F4fa9154e-d9f7-421e-afe6-131a16810090.jpg</url>
      <title>DEV Community: Fatih Şennik</title>
      <link>https://dev.to/fatihsennik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fatihsennik"/>
    <language>en</language>
    <item>
      <title>How to Install WireGuard VPN on Ubuntu and Configure It as a Server — Using Port 443 to Bypass ISP Throttling</title>
      <dc:creator>Fatih Şennik</dc:creator>
      <pubDate>Tue, 12 May 2026 12:52:39 +0000</pubDate>
      <link>https://dev.to/fatihsennik/how-to-install-wireguard-vpn-on-ubuntu-and-configure-it-as-a-server-using-port-443-to-bypass-isp-17jg</link>
      <guid>https://dev.to/fatihsennik/how-to-install-wireguard-vpn-on-ubuntu-and-configure-it-as-a-server-using-port-443-to-bypass-isp-17jg</guid>
      <description>&lt;h2&gt;
  
  
  What is &lt;a href="https://www.wireguard.com/" rel="noopener noreferrer"&gt;WireGuard&lt;/a&gt; VPN ?
&lt;/h2&gt;

&lt;p&gt;WireGuard is a secure network tunnel operating at Layer 3, built directly into the Linux kernel as a virtual network interface. Its goal is straightforward: replace both IPsec and TLS-based solutions such as OpenVPN — and do it better. More secure, more performant, and significantly easier to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A cleaner mental model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At its core, WireGuard is built around a simple principle: a tunnel is an association between a peer's public key and a tunnel source IP. No certificates, no certificate authorities, no complex configuration hierarchies. If you've used OpenSSH, the model will feel familiar — short, static Curve25519 keys handle mutual authentication, and that's it. No central server required. it's peer-to-peer by design, though you can use a hub-and-spoke topology.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fast handshakes, strong privacy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Session creation is handled transparently using a single round-trip key exchange based on the NoiseIK protocol — fast and invisible to the end user. The protocol provides strong perfect forward secrecy and a high degree of identity hiding, so even if keys are later compromised, past sessions stay protected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance-first design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Data in transit is encrypted using ChaCha20Poly1305, a modern authenticated-encryption cipher that's fast even on hardware without dedicated AES acceleration. Packets are encapsulated in UDP, and the kernel-level implementation takes full advantage of Linux's queue and parallelism primitives. Crucially, WireGuard is designed to allocate no resources in response to incoming packets — a key factor in its resilience under load. So, it runs over UDP, which is faster than TCP-based VPNs but can be easliy blocked or throttled by some networks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Better DoS protection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WireGuard improves on the IP-binding cookie mechanisms used in IKEv2 and DTLS by adding encryption and authentication to the cookie itself — making denial-of-service mitigation significantly more robust.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Small enough to audit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Perhaps the most striking aspect of WireGuard is its size: the entire Linux implementation fits in under 4,000 lines of code. Compare that to OpenVPN's ~100,000+ lines and the security implications become obvious. A smaller codebase means a smaller attack surface, and one that's actually feasible to audit and verify.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18rdfy2cozupwgubex0w.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18rdfy2cozupwgubex0w.jpeg" alt="WireGuard VPN" width="800" height="548"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Install WireGuard VPN on Ubuntu and Configure it as a server.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1) Update packages and install WireGuard.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; wireguard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2) Generate server private and public key pair.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wg genkey | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/wireguard/private.key

&lt;span class="nb"&gt;sudo chmod &lt;/span&gt;&lt;span class="nv"&gt;go&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; /etc/wireguard/private.key

&lt;span class="nb"&gt;sudo cat&lt;/span&gt; /etc/wireguard/private.key | wg pubkey | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/wireguard/public.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3) View the generated private &amp;amp; public keys — you will need them in the WireGuard config.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo cat&lt;/span&gt; /etc/wireguard/private.key

&lt;span class="nb"&gt;sudo cat&lt;/span&gt; /etc/wireguard/public.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4) Find your actual network interface name — it will be the one associated with your server's public IP such as ens160 and eth0.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ip a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5) Create your WireGuard server configuration file. You can name the virtual network interface anything you like, such as wg0.conf or custom-name.conf. Let's name it as name0.conf.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/wireguard/name0.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Interface]&lt;/span&gt;
&lt;span class="py"&gt;PrivateKey&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;Copy /etc/wireguard/private.key to here&lt;/span&gt;
&lt;span class="py"&gt;ListenPort&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;443&lt;/span&gt;
&lt;span class="py"&gt;Address&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;192.168.50.1/24&lt;/span&gt;

&lt;span class="c"&gt;## Enable IP forwarding (for routing)
## Please check your network interface name such as ens160.
## Please check that -i name0 same as your config file name.
&lt;/span&gt;
&lt;span class="py"&gt;PostUp&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;iptables -A FORWARD -i name0 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens160 -j MASQUERADE&lt;/span&gt;
&lt;span class="py"&gt;PostDown&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;iptables -D FORWARD -i name0 -j ACCEPT; iptables -t nat -D POSTROUTING -o ens160 -j MASQUERADE&lt;/span&gt;

&lt;span class="c"&gt;## Client 1
&lt;/span&gt;&lt;span class="nn"&gt;[Peer]&lt;/span&gt;
&lt;span class="py"&gt;PublicKey&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;Paste your mac client's public key here.&lt;/span&gt;
&lt;span class="py"&gt;AllowedIPs&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;192.168.50.2/32&lt;/span&gt;

&lt;span class="c"&gt;## Client xN
&lt;/span&gt;&lt;span class="nn"&gt;[Peer]&lt;/span&gt;
&lt;span class="py"&gt;PublicKey&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;Paste your widows or any client's public key here.&lt;/span&gt;
&lt;span class="py"&gt;AllowedIPs&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;192.168.50.3/32&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;6) Enable IP forwarding in the kernel so that server acts as a router, passing traffic between your VPN clients and the outside network.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"net.ipv4.ip_forward=1"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/sysctl.conf 

&lt;span class="nb"&gt;sudo &lt;/span&gt;sysctl &lt;span class="nt"&gt;-p&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;7) Start WireGuard and enable on boot and verify the interface is up.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;wg-quick@name0 

&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start wg-quick@name0

&lt;span class="nb"&gt;sudo &lt;/span&gt;wg show
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;8) If UFW is enabled, open the WireGuard port in the firewall.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ufw allow 443/udp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;9) Every time you update the WireGuard configuration file, remember to restart the WireGuard service for the changes to take effect.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart wg-quick@name0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to Install WireGuard VPN on Mac and Configure it as a client.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Install the official WireGuard app from the Mac App Store: &lt;a href="https://apps.apple.com/us/app/wireguard/id1451685025?mt=12" rel="noopener noreferrer"&gt;Download&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="err"&gt;Click&lt;/span&gt; &lt;span class="err"&gt;'Add&lt;/span&gt; &lt;span class="err"&gt;Empty&lt;/span&gt; &lt;span class="err"&gt;Tunnel'&lt;/span&gt; &lt;span class="err"&gt;in&lt;/span&gt; &lt;span class="err"&gt;the&lt;/span&gt; &lt;span class="err"&gt;app&lt;/span&gt; &lt;span class="err"&gt;and&lt;/span&gt; &lt;span class="err"&gt;paste&lt;/span&gt; &lt;span class="err"&gt;the&lt;/span&gt; &lt;span class="err"&gt;client&lt;/span&gt; &lt;span class="err"&gt;config&lt;/span&gt; &lt;span class="err"&gt;below.&lt;/span&gt; &lt;span class="err"&gt;Make&lt;/span&gt; &lt;span class="err"&gt;sure&lt;/span&gt; &lt;span class="err"&gt;the&lt;/span&gt; &lt;span class="err"&gt;client&lt;/span&gt; &lt;span class="err"&gt;IP&lt;/span&gt; &lt;span class="err"&gt;address&lt;/span&gt; &lt;span class="err"&gt;(e.g.&lt;/span&gt; &lt;span class="err"&gt;192.168.50.2/24)&lt;/span&gt; &lt;span class="err"&gt;matches&lt;/span&gt; &lt;span class="err"&gt;the&lt;/span&gt; &lt;span class="err"&gt;AllowedIPs&lt;/span&gt; &lt;span class="err"&gt;value&lt;/span&gt; &lt;span class="err"&gt;set&lt;/span&gt; &lt;span class="err"&gt;for&lt;/span&gt; &lt;span class="err"&gt;this&lt;/span&gt; &lt;span class="err"&gt;peer&lt;/span&gt; &lt;span class="err"&gt;in&lt;/span&gt; &lt;span class="err"&gt;your&lt;/span&gt; &lt;span class="err"&gt;server's&lt;/span&gt; &lt;span class="err"&gt;/etc/wireguard/name0.conf.&lt;/span&gt;

&lt;span class="nn"&gt;[Interface]&lt;/span&gt;
&lt;span class="py"&gt;PrivateKey&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;This is auto generated. Do not share it with anyone.&lt;/span&gt;
&lt;span class="py"&gt;Address&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;192.168.50.2/24&lt;/span&gt;
&lt;span class="py"&gt;DNS&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;8.8.8.8, 1.1.1.1&lt;/span&gt;

&lt;span class="nn"&gt;[Peer]&lt;/span&gt;
&lt;span class="py"&gt;PublicKey&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;Copy vpn server /etc/wireguard/public.key to here&lt;/span&gt;
&lt;span class="py"&gt;AllowedIPs&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0/0, ::/0&lt;/span&gt;
&lt;span class="py"&gt;Endpoint&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;VPN_SERVER_IP:443&lt;/span&gt;
&lt;span class="py"&gt;PersistentKeepalive&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the connection is established, the &lt;strong&gt;AllowedIPs = 0.0.0.0/0, ::/0&lt;/strong&gt;  setting will route all IPv4 and IPv6 traffic through your VPN server, changing your Mac's public IP to your server's IP.&lt;/p&gt;

&lt;p&gt;If you only want a private network without changing your public IP, set &lt;strong&gt;AllowedIPs&lt;/strong&gt; to your VPN subnet (e.g. &lt;strong&gt;192.168.50.0/24&lt;/strong&gt;) and restart the WireGuard client.&lt;/p&gt;

&lt;p&gt;Make sure you have added your Mac client's public key to your VPN server config at &lt;strong&gt;/etc/wireguard/name0.conf&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="c"&gt;## Client 1
&lt;/span&gt;&lt;span class="nn"&gt;[Peer]&lt;/span&gt;
&lt;span class="py"&gt;PublicKey&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;Paste your mac client's public key here.&lt;/span&gt;
&lt;span class="py"&gt;AllowedIPs&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;192.168.50.2/32&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then restart the VPN server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart wg-quick@name0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;That's it — enjoy your self-hosted, free, and open-source VPN!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>networking</category>
      <category>security</category>
      <category>ubuntu</category>
      <category>wireguard</category>
    </item>
    <item>
      <title>How to Auto-Unlock LUKS2 Encrypted Disks at Boot with Clevis and Tang</title>
      <dc:creator>Fatih Şennik</dc:creator>
      <pubDate>Tue, 12 May 2026 12:21:45 +0000</pubDate>
      <link>https://dev.to/fatihsennik/how-to-auto-unlock-luks2-encrypted-disks-at-boot-with-clevis-and-tang-3b31</link>
      <guid>https://dev.to/fatihsennik/how-to-auto-unlock-luks2-encrypted-disks-at-boot-with-clevis-and-tang-3b31</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Full disk encryption is great — until you reboot a headless server at 3am and realize you need to type a passphrase with no keyboard attached. Every reboot now requires manual passphrase entry. That's... not great when your server is a headless VM sitting in a datacenter rack in another city.&lt;/p&gt;

&lt;p&gt;Enter Clevis and Tang. Together they let your server auto-unlock its LUKS2 volume at boot — but only when it can reach your Tang server on the network. No Tang server reachable? No unlock. It's elegant and your data is safe even if someone walks off with the physical server.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Clevis talks to Tang (and why it's clever)
&lt;/h2&gt;

&lt;p&gt;During boot, Clevis contacts Tang and initiates a JOSE/JWK key exchange. What makes this secure is what doesn't happen — your LUKS passphrase is never transmitted, Tang gains zero knowledge of the disk key, and the derived secret exists only in RAM long enough to unlock the volume. The wire traffic reveals nothing useful to an attacker and the Tang server never sees your LUKS passphrase; it just participates in the math.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3ox1yeqx8hrwf5tebpx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3ox1yeqx8hrwf5tebpx.jpg" alt="Clevis and Tang" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's say that Tang server is unreachable, then Clevis gets no response, the key exchange fails, and the disk stays locked. You can still fall back to a manual passphrase, which is a separate LUKS keyslot you keep as a backup.&lt;/p&gt;

&lt;p&gt;Keep a backup passphrase keyslot! Clevis adds its own keyslot but doesn't touch your existing passphrase. Keep it. Store it in your password manager. If Tang ever goes down permanently you'll need it. LUKS supports multiple keyslots for exactly this reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Tang on your secure key server which is located in different location.
&lt;/h2&gt;

&lt;p&gt;Tang runs as a simple systemd socket service. It's lightweight — It functions solely as a key exchange endpoint, requiring no database and no configuration files other than the key material it generates automatically. it automatically generates its key material in /var/db/tang/. That's it. No config needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt-get update

apt &lt;span class="nb"&gt;install &lt;/span&gt;tang jose

&lt;span class="c"&gt;# Enable and start&lt;/span&gt;
systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; tangd.socket

&lt;span class="c"&gt;# Change its port to any. Example: 9102&lt;/span&gt;
nano /lib/systemd/system/tangd.socket

systemctl daemon-reload

&lt;span class="c"&gt;# Verify it's running&lt;/span&gt;
curl 127.0.0.1:9102/adv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the server security hardened via a separated network segment and a secure random port. The /adv endpoint returns Tang's public key advertisement as JSON. If you can curl it, Clevis can reach it during boot. If you can't, neither can Clevis — fix your firewall first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing Clevis on your luks encrypted server.
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apt-get update

apt &lt;span class="nb"&gt;install &lt;/span&gt;clevis clevis-luks clevis-initramfs clevis-systemd

&lt;span class="c"&gt;# Find your LUKS2 device&lt;/span&gt;
&lt;span class="c"&gt;# Replace /dev/sda3 with your actual LUKS partition&lt;/span&gt;
cryptsetup luksDump /dev/sda3

&lt;span class="c"&gt;# Check your manual passphrase before reboot!&lt;/span&gt;
cryptsetup &lt;span class="nt"&gt;--test-passphrase&lt;/span&gt; &lt;span class="nt"&gt;--key-slot&lt;/span&gt; 0 open /dev/sda3

&lt;span class="c"&gt;# Bind your LUKS2 device to Tang key server&lt;/span&gt;
&lt;span class="c"&gt;# it will ask for your existing LUKS passphrase&lt;/span&gt;
&lt;span class="c"&gt;# Then will fetch Tang's public key and add a new keyslot for LUKS partition.&lt;/span&gt;
clevis luks &lt;span class="nb"&gt;bind&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; /dev/sda3 tang &lt;span class="s1"&gt;'{"url":"http://your-tang-server-ip:9102"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run that bind command, Clevis contacts Tang, fetches its public key, generates a random key, encrypts it using Tang's key material, stores the encrypted blob in the LUKS2 token metadata, and registers it as a new keyslot. The actual decryption key never leaves your machine unencrypted.&lt;/p&gt;

&lt;p&gt;Before embedding Clevis into your boot process, check your network interface name — it could be ens192, eth0, or something similar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ip a | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s2"&gt;"^[0-9]+:"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  ⚠️ Important Gotcha: To avoid the "network isn't up yet" issue during boot, check how your server receives its IP address.
&lt;/h2&gt;

&lt;p&gt;Clevis needs to reach Tang before the root filesystem mounts — but if your network interface isn't up yet, the whole thing silently fails and drops you to a passphrase prompt.&lt;/p&gt;

&lt;p&gt;Open /etc/netplan/50-cloud-init.yaml and verify whether your server is configured for a static IP or DHCP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open initramfs&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano /etc/initramfs-tools/initramfs.conf

&lt;span class="c"&gt;# and add this to end of the file if your server is configured for static ip&lt;/span&gt;
&lt;span class="nv"&gt;IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;SERVER_IP::SERVER_GATEWAY_IP:SERVER_SUBNET::NETWORK_INTERFACE_NAME:none

&lt;span class="c"&gt;# if your server is configured for dhcp then&lt;/span&gt;
&lt;span class="nv"&gt;BOOT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;network
&lt;span class="nv"&gt;DEVICE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;NETWORK_INTERFACE_NAME &lt;span class="o"&gt;(&lt;/span&gt;ens192&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dhcp

&lt;span class="c"&gt;# Update your boot process&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;update-initramfs &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="nt"&gt;-k&lt;/span&gt; all

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Wait before rebooting. Test !&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Try to unlock manually using Clevis &lt;/span&gt;
clevis luks unlock &lt;span class="nt"&gt;-d&lt;/span&gt; /dev/sda3 
&lt;span class="c"&gt;# Check if Tang server is reachable&lt;/span&gt;
curl http://your-tang-server:9102/adv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's all there is to it. Your disk will now decrypt and unlock automatically during boot, no manual intervention required.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>security</category>
      <category>networking</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
