Urgent.News

What's breaking now, across thousands of outlets.

Tech

๐Ÿ•ณ๏ธ HomeLab Chronicles: Episode 9 - Tunnel Vision

Hey all ๐Ÿ‘‹ State of the lab: two nodes, Flux in charge, Airflow alive, backups nightly, RBAC banished to therapy. The UI works from anywhere in the house. But "in the house" is a service radius measured in Wi-Fi bars, and I wanted my Airflow at airflow.sanskararora.in , from anywhere, like a person with a real platform and not two laptops fighting a router for their lives. The classic move isโ€ฆ

In the ninth episode of the HomeLab Chronicles, the focus is on achieving internet-accessible Airflow from anywhere, without compromising security. The lab currently consists of two nodes, with Flux and Airflow functioning properly. However, the challenge lies in making Airflow accessible at airflow.sanskararora.in from any location, while avoiding the pitfalls of port forwarding, router unreliability, and public IP exposure.

Cloudflare Tunnel emerges as the solution, enabling secure, outbound-only access to the Airflow service. A small daemon called cloudflared runs within the Kubernetes cluster, establishing an outbound connection to Cloudflare's edge. Traffic from the domain then travels through this already-open connection, eliminating the need for inbound ports or exposing a public IP.

Two approaches to setting up Cloudflare Tunnel are presented: locally-managed and remotely-managed. The locally-managed method involves creating a tunnel on the machine using cloudflared tunnel create, with routing rules stored in a configuration file within the git repository. The remotely-managed method utilizes the Zero Trust dashboard, where a token is generated and the routing rules are live in the UI.

The remotely-managed tunnel is set up by creating a Deployment with two replicas and anti-affinity, ensuring the tunnel's resilience in the face of node failures. The tunnel's token is securely stored in a Secret, which is then referenced in the Deployment's environment variables. The Public Hostname is configured in the dashboard to map to the Airflow service, and the DNS record is automatically generated.

After implementing the tunnel, the Airflow admin login can be accessed from anywhere, protected by one password and terminated within the house. However, the security concerns remain, as the system now serves as a juicy target for potential attackers. Despite this, the lesson learned is that outbound-only connections offer superior security, eliminating inbound holes and public IP exposure.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Four Levels Down: I Published a Finding and Broke It Twice in Thirty-Six Hours

Yesterday I published a piece called Choice Leaks . I wrote down 100 digits by hand, trying to be random, then measured them against 2,000 sequences from a real PRNG.

  • Published article titled "Choice Leaks" with random digits testing
  • Found no bias, consistent randomness in 2,000 PRNG sequences
  • Later discovered original findings flawed due to digit generation context

5 Practical Performance Tweaks That Actually Sped Up Our Web App

When optimizing web applications, it's easy to get lost in micro-optimizations that don't move the needle for end users. After auditing our stack recently, here are 5 simple, high-impact changes thatโ€ฆ

  • Offloading heavy workflows to background queues improved API response time
  • Switching to modern image formats like WebP and AVIF reduced page weight
  • Implementing edge caching and database indexing alleviated server load

More from Sunday 30 August โ†’