16. Tailscale, WireGuard and Private Networks
“Nobody can knock on a door that is not on the street.”
The story: the café, the database and the one front door
Section titled “The story: the café, the database and the one front door”It is 11 a.m. in a café in Koregaon Park. Priya has a laptop, a chai that went cold ten minutes ago, and a phone that cost ₹12,000 and holds two bars on a good day. The dance-academy app runs on the Oracle VPS. A parent has written to ask why her daughter’s Saturday slot vanished, and Priya wants to look at the bookings table in Postgres herself.
She cannot. Chapter 14 taught her to close the database port to the street, and it did exactly that. From this café, port 5432 on the VPS does not answer. Her colleague, who has been doing networking for longer than Priya has been doing React, shrugs and says, “Just VPN in.”
So she does. The client asks for a username, a password and a six-digit code. The laptop connects, and her addresses change: she now has a 10-something address, the private range her company uses. The bookings table answers. Then she opens the box-office page she is building, and it crawls. Every request leaves the café, travels to a head office in another city, and comes all the way back out. The VPN works. It is also a bottleneck with a lanyard.
This is a composite, stitched together from several afternoons that many of us have had, but the shape is real. Priya’s question at that table is a good one. Why does a private network need one building with one front door? And could it be built some other way?
By the end of this chapter you will be able to answer both. You will also know what it means to put a database on a private network with no public face at all.
A VPN is two things, not one
Section titled “A VPN is two things, not one”Strip away the marketing and a VPN gives you two things. The first is an encrypted tunnel: your packets leave your laptop wrapped so that everyone on the path sees only noise. The second is a private address space: the far end hands you addresses that nobody on the open internet can look up, and your apps treat those addresses as if they sat in the next room.
Priya got both. The tunnel ran from the café to the head office. Her laptop picked up an address from the company’s private range, which is why the bookings table answered at all. Take away the tunnel and those private addresses are numbers nothing on the street can route to. Take away the private addresses and the tunnel is only encryption between two points, with nothing private on the far side to reach.
Read the figure as two layers. The curved line is the tunnel, and the street never sees what travels inside it. The boxes with private addresses only mean something at the two ends. So a VPN problem is almost always one of two problems: the tunnel is down, or the route to the private addresses points somewhere wrong. Most of the troubleshooting you will ever do lives in one of those two boxes.
The old world: everything through one door
Section titled “The old world: everything through one door”Before WireGuard, a company VPN usually looked like a hub with spokes. Head office ran a concentrator, a box that terminated every tunnel. Each branch office and each road warrior dialled in to it, and traffic between two branches went up to head office and back down again.
That design has three problems, and you have probably felt at least one. The concentrator is a bottleneck, because every packet from every spoke queues through one machine. It is a single point of failure, because when it falls over, nobody at any branch can reach anybody else. And it is a capacity question, because you buy the box for the busiest day, not the average one.
The protocols were mostly IPsec, which is powerful and famously fiddly to configure, or OpenVPN, which runs in user space over TLS, works through most networks, and pays for that flexibility in speed and certificate housekeeping. Both are sound tools. Both are tools where one mistyped option can eat an afternoon. Neither was built for a world where your laptop, your phone and a cloud VPS each need to reach each other directly.
WireGuard: small enough to read over chai
Section titled “WireGuard: small enough to read over chai”Tailscale is not a new kind of tunnel. Underneath the login screens and the admin console it runs WireGuard, so before we add the coordinator you need WireGuard in your head.
WireGuard was written by Jason Donenfeld and entered the Linux kernel in version 5.6, in 2020. The whole implementation is roughly 4,000 lines. The older stacks run to many times that, and they carry decades of options, cipher menus and legacy modes. A small codebase is not a style preference. It is a security property. A reviewer can read all of it over a long weekend, and people do.
The crypto has no menu either. Curve25519 handles key agreement, ChaCha20-Poly1305 handles encryption and authentication, and the handshake follows the Noise framework. Peers do not negotiate which cipher to use. There is one answer, and that removes a whole family of downgrade bugs, where an attacker talks two machines into a weaker option.
The peer model
Section titled “The peer model”WireGuard has no client and server in the usual sense. It has peers. Each peer owns a key pair, and the public key is its identity. You tell each peer about the others with two facts: the other side’s public key, and an AllowedIPs list.
That list does two jobs. It is a routing table, telling the kernel which packets go to which peer. It is also an access list, telling WireGuard which source addresses it will accept from that peer. If a packet arrives from one key but claims an address that key does not own, it is dropped. Your configuration is both your map and your guest list.
WireGuard is also quiet. It does not answer packets from strangers. A scanner that pokes your UDP port gets silence, not a banner or an error, and silence is hard to fingerprint. The doorknob-rattlers get nothing useful from a WireGuard port, which is one reason it is pleasant to run.
Why it is fast
Section titled “Why it is fast”Speed comes from the same place as safety: the thing is small. The code runs in the kernel, so packets do not bounce into user space for every step. The cipher is fast in plain software, so it needs no special hardware. There is one handshake, and after that the tunnel is just encrypted packets moving along.
Benchmarks depend on your machine and your link, so I will not quote you a number. The honest summary is that on a modern box the tunnel is rarely the slow part. Your home upload speed usually is.
What WireGuard does not do
Section titled “What WireGuard does not do”It does not find peers. It does not log anyone in. It does not distribute keys. You copy public keys between machines by hand, you edit the configuration when an address changes, and you remove a key by hand when someone leaves. For three machines that is a pleasant afternoon. For thirty laptops and a phone per person, it is a slow way to lose a month.
That gap is exactly what Tailscale fills. It keeps WireGuard as it is and automates everything around it.
How Tailscale is put together
Section titled “How Tailscale is put together”Tailscale takes WireGuard and adds the three things WireGuard leaves to you: finding peers, handing out keys, and deciding who may talk to whom. It does this by splitting the system in two.
The control plane: the phone book
Section titled “The control plane: the phone book”The control plane is the coordinator. Tailscale runs it for you. When you log in with Google, GitHub or a Microsoft account, you prove your identity to the coordinator, which then knows that this laptop belongs to you.
Each device generates its own WireGuard key pair on first login. The private key stays on the device. Only the public key goes to the coordinator, along with the device name and the address the device appears to have on the internet. The coordinator keeps that as a map of your tailnet, pushes the map to every device, and pushes it again whenever something changes. A laptop joins, a key rotates, a machine leaves: the map updates everywhere.
Notice what the coordinator never sees. It holds public keys and addresses, not the contents of anything you send.
The data plane: the phone call
Section titled “The data plane: the phone call”The data plane is the traffic itself. Once two devices hold each other’s public keys and endpoints, they talk directly over WireGuard, with no server in the middle. The laptop in Pune and the VPS in a data centre exchange packets as if they shared a cable.
This split is the main idea of the chapter. The phone book can go down for a while, and existing conversations often carry on, because the peers already know each other. What breaks is joining, changing rules and learning about new peers. Know which of the two you depend on, and when.
NAT traversal: two gates and a hole
Section titled “NAT traversal: two gates and a hole”Here is the awkward part. Your laptop at home has an address like 192.168.1.7, which only means something inside your flat. The router wears the public address, 198.51.100.23, and the gate guard at the society entrance, which is the router’s NAT, decides who gets in. The gate logs every resident who went out, so replies can come back in. Nobody else gets through unless somebody inside asked first.
Two laptops behind two different gates cannot call each other, because neither gate has been asked anything. The trick is hole punching. The coordinator tells each device the other’s public endpoint. Then both send UDP packets to each other at roughly the same moment. Each outbound packet opens a hole in its own gate, so when the other side’s packet arrives, the gate recognises it as a reply to a conversation already under way and lets it in.
It works when the gate is easy: the router reuses the same outside port for a given inside device, whoever it talks to. It fails when the gate is hard, often called symmetric NAT. A mobile carrier running CGNAT, which is a gated township around the gated society, usually behaves this way. The port the coordinator learned is not the port the carrier uses for the second peer, so the holes never line up.
Treat the details as roughly right rather than exact. Routers differ, and Tailscale has added port-mapping support over the years. The rule is the lesson: easy gates punch through, hard gates usually do not.
Try it below. You can set each side’s gate, block UDP, and watch the attempt.
Try it: punch a hole between two NATs
Press Start to watch A and B try to reach each other.
Still pictures, or no scripts: the coordination server hands each side the other's public address and port. Both send a probe at the same moment. NAT A opens a hole toward B, and B's gate lets the reply in, so the two devices talk directly and encrypted. Now make B symmetric. B picks a new outside port for each destination, so the port the server handed to A no longer matches what B uses toward A. Both probes hit a closed door. The traffic then takes the DERP relay: slower, still encrypted end to end, and the relay only ever sees ciphertext.
DERP: the relay when the holes do not line up
Section titled “DERP: the relay when the holes do not line up”Sometimes the holes never line up. A hard gate, a strict firewall, or a network that blocks UDP outright will defeat hole punching however carefully both sides time their packets. Tailscale does not give up. It falls back to DERP, short for Designated Encrypted Relay for Packets. A DERP server is a relay on the public internet that speaks HTTPS, which is the one thing almost every network lets through.
Each device keeps a connection open to a nearby DERP server. When no direct path exists, packets go device to relay to device. The relay is a courier, not a reader. Your packets are already WireGuard-encrypted before they leave your laptop, so the relay sees ciphertext and the fact that two devices are talking. It cannot see what they say.
The detour still costs something. Packets travel to a relay city first, so latency goes up, and throughput can drop. A chat over DERP feels fine. A large file copy feels slower. That is the price of getting through at all.
Tailscale does not treat the relay as a permanent home. Both sides keep probing for a direct path in the background. If a hole opens later, because the other gate changed or you moved to a friendlier Wi-Fi, the traffic moves off DERP. The lab shows you which path you are on.
Tailnet addresses, MagicDNS and ACLs
Section titled “Tailnet addresses, MagicDNS and ACLs”Every device on your tailnet gets a stable address from 100.64.0.0/10. You met that block in Chapter 1, where carriers use it for their own gated townships. Tailscale borrows it because almost nobody puts it inside a home or office, so tailnet addresses rarely clash with your LAN’s 192.168 or 10 addresses. A laptop keeps its 100.x address while its public IP changes every time it hops networks. The address belongs to the device, not to the café.
Numbers are hard to remember, so MagicDNS gives each device a name. Your laptop answers to laptop and the lab VPS to lab, resolved inside the tailnet only. Once you use names in your config, the IPs stop mattering.
Reachability is controlled by an access policy: a file of rules that says which device or person may reach which port on which machine. You write it once, and Tailscale enforces it everywhere. Two ideas keep it livable. Groups are people, so group:ops is you and anyone else who administers the lab. Tags are machines, so tag:lab belongs to the VPS itself and survives when a person leaves the team.
A policy in the shape that matters:
{ "groups": { "group:ops": ["you@example.com"] }, "tagOwners": { "tag:lab": ["group:ops"] }, "acls": [ { "action": "accept", "src": ["group:ops"], "dst": ["tag:lab:22,8080"] } ]}Read it as: people in ops may reach ports 22 and 8080 on anything tagged lab. The rule grants nothing else. A new tailnet has historically started with a permissive default, so tighten it on day one rather than trusting the default for years.
Subnet routers and exit nodes
Section titled “Subnet routers and exit nodes”Not every device can run Tailscale. Your office printer, a legacy box on the LAN, or a managed database appliance will never install a client. A subnet router solves that. One machine that is on the tailnet, usually the one already sitting inside that network, advertises the local subnet to the tailnet. Other tailnet devices can then reach 192.168.x addresses through it, while the printer stays exactly as dumb as it was.
The same idea works in reverse for traffic you want to leave through somewhere else. An exit node is a tailnet device that agrees to send your internet traffic out on its own connection. Pick the home machine and your coffee-shop laptop looks, to the websites it visits, as if it sits at home. It is useful, and it is also a trust decision: whatever exits through that node is now that node’s problem. Use exit nodes on purpose, not by default.
Both features are routes, and both pass through the same access policy. A subnet route that nobody’s ACL allows is a locked door with a nice sign on it.
Tailscale SSH
Section titled “Tailscale SSH”You already know SSH from Chapter 6. The key file, the port, the authorized_keys list. Tailscale SSH replaces the key dance with identity. The tailnet already knows who you are because you logged in with Google or GitHub, and it already knows which machine you are talking to. When you enable Tailscale SSH on the lab VPS, a connection from an allowed tailnet identity is accepted without a key on the server, and the policy decides which Linux users you may become.
Is this better than keys? For a small team, usually yes. Offboarding becomes one change in the policy file instead of a hunt through every authorized_keys on every box. The gotcha is that you now depend on the control plane for login. If the coordination service is unreachable, new sessions stop, and the only way in may be the cloud console. Keep that console path written down and tested, which is the break-glass plan we return to below.
Serve versus Funnel
Section titled “Serve versus Funnel”Tailscale has two ways to publish a web app, and the difference is the whole point.
Serve shares a local service with your tailnet only. tailscale serve puts a machine’s local port behind a tailnet HTTPS name, with a real certificate, and only devices that the policy allows can open it. The app itself can keep listening on 127.0.0.1 and never see the outside world. Nobody on the public internet can even learn that the name exists.
Funnel is the opposite. It opens a service to the public internet through Tailscale’s relays. It is a legitimate tool for a demo, a webhook receiver, or a share link you want a stranger to open. For anything internal, it is the wrong direction. Treat Funnel the way you treat a public port: deliberate, documented, and never on an admin panel.
If you remember one sentence from this section, make it this: Serve keeps it in the tailnet, Funnel puts it on the street.
The pattern: close the doors, keep one private corridor
Section titled “The pattern: close the doors, keep one private corridor”Here is the recommendation, and it is firm. SSH, databases, admin panels and internal tools should never sit on a public address. Not behind a password, not behind a clever port number, not with fail2ban watching. Not at all. You reach them over the tailnet, and the public internet sees nothing but your web app on 443.
The author’s team-status tool is the perfect Tailscale-only app. Eight people use it every day, nobody outside the team has any business with it, and its data is about who is blocked on what. Run it on 127.0.0.1:8080 on the lab VPS, publish it with tailscale serve, and write an ACL that lets only the team group reach it. The public address never hears of it. Doorknob-rattlers can try every name they like, and there is no door to find.
This is also where you see the trust trade-off honestly. Tailscale’s control plane is a dependency, and if your login provider has a bad day, your access does too. Headscale, covered below, lets you run that control plane yourself, at the cost of running it. Either way, keep one break-glass path that does not depend on the tailnet: the cloud provider’s web console, with its own strong login and its own recovery codes. You will not need it often. The one time you do, you will be glad it was written down before the 2 a.m. call.
The alternatives, briefly
Section titled “The alternatives, briefly”Headscale is an open-source, self-hosted control plane that speaks the Tailscale client protocol. You keep the nice clients and give up the hosted coordination. It is a good fit when the trust story matters more than the convenience.
ZeroTier is an older mesh with its own virtual network model. It is capable, and it lives in a different ecosystem with its own clients and policies, so you would be choosing it on purpose, not by accident.
NetBird is a self-hostable, open-source mesh built on WireGuard with a similar shape to Tailscale. Worth a look if you want the same model without the hosted dependency.
Plain WireGuard is the bottom layer. You write the keys, the endpoints and the AllowedIPs yourself, and nothing hunts for the holes. For two or three fixed servers it is pleasantly honest, and for a team of changing laptops it becomes a spreadsheet with a cryptographic accent. Free-plan limits and product details change, so check the current terms before you commit to any of them.
Putting it to work: the team-status tool
Section titled “Putting it to work: the team-status tool”Your team-status tool is the ideal first tenant for a private network. Eight people use it, nobody outside the team has any business reading it, and it was written to run on a laptop. It probably listens on a port nobody thought about, and it works perfectly on localhost, which is the cursed sentence this book keeps coming back to.
Here is the move. Bind the app to 127.0.0.1:8080, so only processes on the same machine can talk to it at all. Nothing listens on a public address. Then ask Tailscale to serve that port inside your tailnet. The tool gets a name that MagicDNS resolves, with HTTPS on that name. Your laptop reaches it. Your phone, on the tailnet, reaches it. A stranger on the café Wi-Fi does not, and not because they were asked nicely: they are not on the tailnet, and the tool has no door that faces the street.
That is Serve. Funnel is the sibling switch that opens the same kind of front door to the public internet. It is the right tool for things you genuinely want strangers to visit: a public demo, a payment provider’s webhook receiver, a status page for customers. For the team-status tool, Funnel is a mistake wearing a helpful hat. Don’t use it.
Who gets in is a policy, not a habit. Tailscale’s access rules (ACLs) say which devices and users may reach which ports. You group the eight people into a team and state, in one place, that the team reaches the status tool and nothing else. Devices can carry tags, so the lab server is “the lab server” rather than some laptop’s name, and the rule outlives the hardware. When someone leaves the team, you remove them from the group and their access goes with them. Nobody has to remember which of six firewalls had their address in it.
Chapter 17 meets Cloudflare Tunnel, which is also an outbound corridor, but one that serves public visitors through a doorman. The two solve neighbouring problems. Keep the difference in your head until then.
The lab: close the front door and keep the tailnet
Section titled “The lab: close the front door and keep the tailnet”Goal. By the end, your throwaway lab VPS answers SSH only over the tailnet. The public address still exists, but nothing on port 22 answers it, and you can show the difference with your own eyes.
Here are the steps, in order, with no commands. The hints live in the exercises.
- Put your laptop, your phone and the lab VPS on the same tailnet. Tag the VPS, so the access rule can say “the lab box” rather than a hostname you will forget.
- Reach the VPS over SSH by its MagicDNS name, from the laptop and then from the phone. Keep your current public session open while you do this. Never close the only door you have until a new one is open and you have walked through it.
- Write one access rule: your devices may reach port 22 and the admin port on the lab box, and nothing else. Other tagged machines stay out.
- Remove the public rule for port 22 in the cloud provider’s firewall. Then remove it from the host firewall too. Two locks are better than one lock and a hope.
- Open the cloud console in a browser and confirm that you can get a shell through it, before you rely on it. That console is the break-glass route if the tailnet has a bad day.
- Bind the admin page to 127.0.0.1 on port 8080, and share it into the tailnet with Serve. It answers on its tailnet name and on nowhere else.
How you’ll know it worked.
- SSH by tailnet name works from the laptop and from the phone.
- A tailnet ping to the lab box says whether the path is direct or relayed, and you can name which in one line.
- From the phone on mobile data, with Tailscale switched off, a connection to the public address on port 22 does not get in. It times out rather than refusing, because the host drops the packets quietly. Quiet is what you want a stranger to experience.
- The admin page loads by its tailnet name and does not load from the public address.
What you now know
Section titled “What you now know”- A VPN is two things: an encrypted tunnel that carries packets between two points, and a private address space that only means something inside that tunnel.
- Old-world VPNs funnelled everyone through one concentrator. Every packet took a detour through it, and when it fell over, everybody fell over with it.
- WireGuard is a small, opinionated tunnel. Each peer has a public key, an allowed-IPs list does double duty as routing and filtering, the crypto is modern, and the code is small enough to read over a cup of chai. It has lived in the Linux kernel since 5.6 (2020).
- Tailscale splits the work in two. The control plane handles identity, keys and who may talk to whom, and it never carries your traffic. The data plane is WireGuard packets moving directly between your devices.
- Two devices behind NAT can often meet by opening holes in their own gates at the same moment. When the gates are too strict to cooperate, a DERP relay carries packets it cannot read.
- Tailnet addresses in the 100.64.0.0/10 range and MagicDNS names give your private buildings addresses. ACLs and tags decide who may knock. Subnet routers and exit nodes stretch the tailnet to places that cannot run the client.
- Serve shares inside your tailnet. Funnel opens to the public internet. Reach for Serve first, and treat Funnel as a decision you make on purpose.
- The pattern to take to work: SSH, databases, admin panels and internal tools do not face the street. They live on the tailnet, and your break-glass path is the cloud console.
You came in knowing that the pieces work. You now know why they work, and where the doors should be. Your team-status tool can leave the public internet tomorrow, and the only person who will notice is the scanner that has been rattling its doorknob for weeks.
Self-quiz
Section titled “Self-quiz”1. What are the two halves of a VPN, really?
An encrypted tunnel that carries packets between two points, and a private address space that only makes sense inside that tunnel. The tunnel hides the traffic. The address space gives the devices somewhere private to be.
2. Why did hub-and-spoke VPNs become a bottleneck?
Every packet between two branches detoured through the central concentrator. That box had to be reachable, sized for everyone, patched and kept alive, and when it failed, the whole organisation lost its private network at once.
3. In WireGuard, what identifies a peer, and what does its allowed-IPs list do?
A peer is identified by its public key. The allowed-IPs list tells the interface which destinations to send to that peer, and it also filters which source addresses that peer may use. One list, two jobs.
4. Which part of Tailscale carries your traffic, and which part only tells devices about each other?
The data plane carries your traffic, and it goes directly between peers when it can. The control plane distributes keys, endpoints and identity, and it never sees the payload. That is why a control-plane outage does not usually cut off devices that are already talking.
5. Two devices sit behind hard, symmetric NATs. Can they hole punch, and what happens if they cannot?
Usually not. A symmetric NAT picks a new public port for each destination, so the hole you open toward one peer is not the one the other peer is aiming at. Tailscale then falls back to a DERP relay. The relay forwards packets it cannot read, so the path is slower but still end to end encrypted.
6. Your team-status tool should be visible to your eight teammates and nobody else. Serve, Funnel, or neither?
Serve, on the tailnet, with a MagicDNS name and an ACL that grants access by group or tag. Funnel would publish it to the whole internet, which is the opposite of what you want. Neither is also defensible if the tool only needs to be reached from your own devices, but Serve covers your teammates without opening anything to the street.
Exercises
Section titled “Exercises”Warm-up 1. Two halves of a VPN. In your own words, explain why a VPN needs both an encrypted tunnel and a private address space. What breaks if you only have one of them?
Answer
The tunnel hides the packets from anyone on the path, so the internet sees only ciphertext. The private address space gives your devices addresses that mean something to each other, such as a database at 10.0.0.5, and that nobody outside the tunnel can route to. Without the tunnel, the private addresses leak onto networks that cannot route them. Without the address space, you have an encrypted pipe with nothing private to talk to.
Warm-up 2. Where does a tailnet address come from? Your laptop has a tailnet IP in the 100.x range. Which block does it come from, and why is that block a good choice for a private network that sits on top of your home and cloud networks?
Answer
It comes from 100.64.0.0/10, the shared address space that carrier-grade NAT already uses. Because that block is rarely used on home routers, it is unlikely to clash with your LAN, which is the 192.168.x range in your case. The clash problem is why VPN clients fail on hotel Wi-Fi so often, so a block that home routers rarely use is a sensible default.
Warm-up 3. Why bind the admin panel to 127.0.0.1? Your admin panel listens on 127.0.0.1:8080 on the lab VPS. What does that buy you, and how does tailscale serve reach it without opening the port to the world?
Answer
Binding to 127.0.0.1 means the panel accepts connections only from processes on the same machine. Nothing on the public address, and nothing on the private one, can reach it directly. tailscale serve runs on the same machine, takes requests that arrive over the tailnet, and forwards them to the loopback address. The panel never needs a public port, so there is nothing for a scanner to find.
Lab 4. Direct or relayed? Connect your laptop and the lab VPS on the tailnet. Work out whether the path between them is direct or relayed, and then explain what the answer tells you about the NATs in front of each device.
Hint
Run tailscale ping against the lab’s tailnet name a few times. The output names the path it used. Compare the latency on a direct path with the latency on a relayed one.
Model solution
On a typical home connection to a VPS with a public address, the first pings often go through DERP while the devices learn each other’s endpoints, and then switch to a direct path. A direct result means the hole punch succeeded. A relayed result that persists means one side has a hard NAT or blocks UDP, and the relay is carrying the traffic. Either way the relay sees only ciphertext. Write down which you saw and what you think sits in front of each device.
Lab 5. Prove that the front door is closed. From your phone on mobile data, with Tailscale switched off, try to reach port 22 on the lab VPS’s public address. Predict the result before you run it, and then say what the result proves and what it does not.
Hint
From a machine outside the tailnet, nc -vz -w 5 203.0.113.10 22 should report a timeout or a refusal, not a banner. Run it once with Tailscale off and once with it on, using the tailnet name.
Model solution
With the firewall doing its job, the public attempt times out or is refused. Over the tailnet, the same SSH session works. The result proves that port 22 is not reachable from the open internet on this path. It does not prove that the rest of the box is safe, so check the other open ports too, and remember that the cloud firewall and the host firewall are separate layers.
Lab 6. The break-glass drill. Remove the public rule for port 22 at the cloud firewall and on the host. Then lock yourself out on purpose from the tailnet side, and recover through the cloud console. Write the steps you took, in order, as a runbook entry your teammates could follow at 2 a.m.
Hint
Keep one SSH session open while you change the firewall rules, so you do not cut the branch you are sitting on. Test the console login before you remove anything. The console is the only way back in, so verify it works first.
Model solution
A good runbook entry names the console URL and who holds the login, says to check the tailnet first and the console second, lists the exact firewall rule to restore, and records the date of the last successful drill. A drill that has never been run is not a break-glass path, it is a hope.
Staff 7. A second tool, three rules. Your team wants a second internal tool, a billing reconciliation dashboard visible only to two people. Design the ACL and tag plan so that nobody else on the tailnet can reach it, and say why tags suit it better than user names.
Model answer
Tag the host tag:finance-tools and tag the two laptops tag:finance, so the grant reads as a rule about roles rather than people. The ACL allows tag:finance to reach tag:finance-tools on the one port the dashboard uses, and nothing else. Tags survive a laptop replacement and a teammate’s departure, because the policy is about the role, not the name. Review the ACL in version control, and test it with a device that should be refused.
Staff 8. Hosted control plane or Headscale? Your team is eight people with one lab VPS and a status tool. Argue for hosted Tailscale or for a self-hosted Headscale control plane. Name the trust trade-off you are accepting in each case, and say what would change your mind.
Model answer
For eight people, hosted Tailscale is the sensible default. Its control plane is someone else’s operations problem, and the failure mode is that new devices cannot join while existing peers keep talking. Headscale keeps the coordination in your hands, which helps if data-residency or vendor trust matters to you, but it adds a server you must patch, back up and monitor. Change the answer if your team grows past what the free plan covers, if a compliance rule forbids a third-party control plane, or if you find yourself already running the rest of the stack in a way that makes a second server cheap.
Book 2 of a series. Book 1: The Glue.