← Resource hub

Secure Infrastructure · May 19, 2023

How to Set Up Tailscale VPN

A practical walkthrough for building private, identity-aware connectivity between remote users, web applications, ERP systems, and databases with Tailscale.

RTCS Research 13 min read Practitioner guide
How to Set Up Tailscale VPN

Remote teams need a secure way to reach internal systems without exposing every service to the public internet. This guide recreates the original RTCS Tailscale lab and explains how a small organisation can use an encrypted mesh network and least-privilege access controls.

01

Why an overlay network helps

Traditional hub-and-spoke VPNs send traffic through a central gateway. Tailscale uses WireGuard-based encrypted connections and attempts direct device-to-device paths, reducing dependence on a single network bottleneck.

The security value is not simply encryption. Devices and users receive identities, and access can be expressed as policy: who may reach which system, on which port, and for what operational purpose.

  • Keep database and ERP servers off the public internet.
  • Give administrators, developers, and database specialists different access.
  • Apply deny-by-default rules instead of trusting every connected device.
  • Maintain a central view of enrolled devices and access policy.
Original RTCS network architecture diagram for the Tailscale lab
02

The RTCS lab architecture

The original demonstration used a public WordPress web server, an ERPNext application server, and a MariaDB server. Firewall rules allowed public web traffic only where required, while administration and database access travelled through the private Tailscale network.

Three user roles were modelled: an administrator with broad server access, a developer limited to application services, and a database administrator limited to the ERP and database systems over SSH.

03

Express least privilege as code

Access rules should follow job responsibilities rather than granting every member full network reach. The simplified example below reflects the intent of the original lab while using role-based groups that are easier to maintain as teams grow.

{
  "groups": {
    "group:admins": ["admin@example.com"],
    "group:developers": ["developer@example.com"],
    "group:dba": ["dba@example.com"]
  },
  "acls": [
    { "action": "accept", "src": ["group:admins"], "dst": ["tag:server:*"] },
    { "action": "accept", "src": ["group:developers"], "dst": ["tag:app:80,443"] },
    { "action": "accept", "src": ["group:dba"], "dst": ["tag:database:22", "tag:erp:22"] }
  ]
}
04

Validate access, not just connectivity

A successful deployment proves both allowed and denied paths. Confirm that administrators can perform approved maintenance, developers can reach only the application interfaces they need, and database users cannot move into unrelated systems.

Retest after role changes, device replacement, policy edits, and application migrations. Remove inactive devices and stale identities quickly, require strong identity-provider controls, and monitor unusual administrative changes.

05

Production hardening and operations

A useful lab becomes a dependable production control only when enrolment, ownership, monitoring, recovery, and offboarding are designed together. Connect the tailnet to the organisation’s identity provider, require MFA, and define who may create reusable authentication keys or change access policy.

Servers should use tags owned by tightly controlled administrator groups. User devices should remain attributable to individual identities, and high-risk administrative paths should be separately logged and reviewed.

Device lifecycle

Document how devices are approved, updated, replaced, quarantined, and removed. Expiring nodes and rapid offboarding reduce the chance that a forgotten endpoint remains trusted.

DNS and service naming

Use stable internal names rather than distributing private addresses. Validate split-DNS behaviour and ensure a DNS failure does not silently push users toward an exposed public service.

Monitoring and recovery

Alert on policy changes, new privileged nodes, unusual administrative access, and repeated connection failures. Keep a tested emergency path for restoring access if the identity provider or policy configuration fails.

06

Deployment checklist

Roll out in controlled stages: inventory services, identify owners, classify access requirements, deploy to a pilot group, validate permitted and denied paths, then expand while monitoring support and security events.

  • Map every service and port before writing policy.
  • Create named user and server groups with accountable owners.
  • Test from managed and unmanaged devices.
  • Document break-glass access and recovery steps.
  • Review access quarterly and after every role change.

Security checklist

What to carry forward.

01Keep private services private.

02Use identity and role-based policy.

03Deny unneeded east-west access.

04Test allowed and blocked paths.

05Review devices, identities, and policy continuously.

Protect today. Prepare for tomorrow.

Ready To Secure
What Matters?

Talk to our experts and build a security program that protects your people, data, applications, AI systems, and future.

Stay Ahead of Threats

Get cybersecurity insights, threat intelligence, AI security updates, and practical defense guidance straight to your inbox.