Apple TV as VPN

Emil Lykke Grann

Emil Lykke Grann

September 8, 2024

If you’ve been keeping up with my previous posts or watched my latest YouTube video (@emilhacking1337), you’ll know I’ve been working on building my own home server. It’s running TrueNAS Scale, and as part of this setup, I wanted to be able to access some of my “videos” from anywhere. That’s where my Apple TV comes into play.

While exploring solutions, I stumbled upon something called Tailscale. Tailscale is a powerful VPN provider, but not like the typical VPNs you might be familiar with. Most VPNs use a “hub-and-spoke” architecture, meaning your devices connect through a single VPN gateway. This setup can be pretty inefficient, especially when your connection is routed in a roundabout way, like this:

Figure 2(a). Inefficient routing through a traditional VPN concentrator.

Figure 2(a). Inefficient routing through a traditional VPN concentrator. (Tailscale)

Instead of routing all your traffic through one central point, Tailscale uses a “coordination server” model. This server doesn’t handle the heavy lifting of your data – it just manages public key sharing. This allows your devices on a Tailscale network to connect directly to each other without any bottlenecks.

With this understanding, I decided to set up Tailscale to access my home devices. However, since I’m running multiple Docker containers, setting up Tailscale on each one would have been a huge time sink. That’s where the Apple TV came in handy. By installing Tailscale on the Apple TV, it becomes part of my Tailnet (Tailscale network) and is accessible by other devices connected to the network. Even better, you can use the Apple TV as a subnet router, which lets any device on your Tailnet connect to your home network’s subnet. Through Tailscale’s access control settings, I can specifically choose which IPs and ports are accessible to other members of the Tailnet, keeping my network secure.

So, if you need access to your home network from anywhere, I highly recommend using Tailscale – and if you have one, an Apple TV makes the setup even easier.

Now, I can watch my “videos” from anywhere, and it works like a charm.