Přeskočit obsah

Connecting to Tailscale

How Protequ reaches it

Protequ does not reach a device here: this adapter makes the Protequ install itself join your Tailscale network (your "tailnet"). Once it has joined, authorised people on the tailnet can open the Protequ web interface from anywhere, with no port opened on your firewall. The connection is outbound only.

Before you start

  • A Tailscale account for your organisation, and an administrator who can open the Tailscale admin console.
  • A reusable, tagged auth key created by that administrator (steps below). Use a tag such as tag:protequ, so the node does not belong to one person and its key does not expire with a user.
  • Access rules in the tailnet that allow the people who need Protequ to reach that tag on port 443.
  • The Protequ server must be able to reach the internet over HTTPS (outbound).

On the Tailscale side

  1. Sign in to the Tailscale admin console and open Settings > Keys.
  2. Choose Generate auth key.
  3. Switch on Reusable. Set an expiry that suits your policy (the longest allowed is 90 days).
  4. Switch on Tags and pick the tag Protequ should use, for example tag:protequ.
  5. Copy the key. It is shown only once and starts with tskey-auth-.
  6. If you want Protequ to act as a subnet router (optional), later approve the advertised routes under the machine's entry in the console.

In Protequ

Add the Tailscale adapter, then add a Tailscale node device and fill in:

The settings may be shown under their parameter name (in brackets) rather than a friendly label.

Setting What it does
Auth key (auth_key) The key you copied above. Needed for the first registration, and again if the saved login is lost or expires. Hidden in the interface and audit log.
Hostname (hostname) The name of this Protequ install in your tailnet, for example protequ-site1. Leave empty to use the container name.
Expose the front door (serve_front_door) On by default. Makes the Protequ web interface reachable on port 443 of the node name.
Front door target (front_door_target) Where tailnet traffic is forwarded inside Protequ. Leave at the default nginx:443.
Advertised routes (advertise_routes) Optional list of networks (for example 192.168.10.0/24) this install announces to the tailnet as a subnet router. An administrator must approve them in the console.
Tailscale SSH (enable_ssh) Off by default. Turns on Tailscale's own SSH access.

Changes are not applied live. After editing any setting, restart the device; the new values are applied when it reconnects.

Confirm it works

The device goes online in Protequ and a connection-restored event is recorded. In the Tailscale admin console the machine appears under Machines with the tag you chose. From another device on the tailnet, open https://<node name>.<your tailnet>.ts.net.

Using the MagicDNS name for sign-in

Protequ only accepts sign-in on host names it knows. To use the Tailscale name (for example protequ-site1.tail1234.ts.net) you tell the installer about it once:

  1. Run the Protequ installer (on an existing install, run it again) and open the Network access step. (The Linux installer, pqinstall, asks the same as "Additional names / IPs (comma-separated, optional)", or takes the full list of names with --sans; see below.)
  2. In Additional names / IPs (optional, comma-separated), enter the name, together with any addresses you already use.
  3. Apply. The installer adds the name to the front door certificate, to the trusted hosts and to the allowed sign-in redirect addresses in one go. Applying recreates the Protequ containers; your data is kept.

The installer remembers these names. The field is also filled in from the names already present in the install, including names that were added by hand earlier, so they are not lost. What is left in the field is what is applied; delete a name there to remove it. With pqinstall, when --sans is omitted the names already in the install's .env are the default, and --yes keeps them. --sans replaces the remembered list, so it must carry every name, for example --sans 192.168.1.90,protequ-site1.tail1234.ts.net; --sans "" clears them.

Known limitation: when Use my own TLS certificate is ticked in the Windows installer, the Additional names / IPs field is not shown and no extra names are applied. In that case enter the names with the Linux installer's --sans, or use the manual route in the guide "Enabling remote access with Tailscale", under "Without re-running the installer (not recommended)".

Until the name is known, the page may load but sign-in is refused. If the install has no remote-access name at all, the adapter says so in its log: a warning that mentions Network access and Untrusted host header, with the node's MagicDNS name as an example.

Using your own DNS name (optional)

You can use a name of your own, for example pq-site.example.com, instead of the .ts.net name:

  1. Enter your name under Network access as described above.
  2. Read the node's Tailscale IP from the adapter log (docker logs adapter-tailscale). The connected line looks like Tailscale connected: dnsName=…, ip=100.x.y.z, tailnet=…, peers=…, keyExpiry=….
  3. At your DNS provider, create an A record for your name that points at that ip= value. The IP does not change when the installer is run again, once the node runs with the named volume (see Security notes below): the first installer run that creates the volume registers the node again, so create the A record after that run.

Creating the record does not make Protequ reachable from the internet. Only devices on the tailnet can connect, and the tailnet access rules still decide who. A CNAME to the *.ts.net name does not work, because those names cannot be resolved publicly.

The front door certificate is signed by this install's own certificate authority, so a device shows a warning until it trusts that authority. Download it from https://<your name>/ca.crt and install it on the device.

Security notes

  • The adapter opens no listening port; it only connects out to Tailscale.
  • The auth key is stored in the Protequ configuration like any other setting, is masked in the interface and audit log, is written to disk only for the moment it is used, and is never logged. Prefer a short expiry and replace it when it lapses.
  • Anyone the tailnet access rules allow to reach the node can reach the Protequ sign-in page. Protequ users still need their own accounts; restrict who can reach the tag with Tailscale access rules.
  • Advertised routes expose those networks to the tailnet once approved; advertise only what is needed.
  • The node state (its login) is kept in a named volume of the adapter, which the installer keeps when it is run again, so the node keeps its name and Tailscale IP across reinstalls. The first installer run that introduces this volume starts with an empty one, so the node registers once more with the stored auth key; delete the old machine entry in the console. Removing the volume has the same effect.

If it does not connect

  • The device stays offline and the log says the node needs login. The auth key is missing, expired, already revoked, or not reusable and already used. Create a new key, enter it in the device, and restart the device.
  • The machine joined but your people cannot reach it. Check the Tailscale access rules allow their users to reach the tag on port 443.
  • Advertised routes show as pending. An administrator must approve them in the admin console (machine > Edit route settings).
  • The key worked once and now fails. The key reached its expiry. A node that is already registered keeps working without the key, but a new registration needs a fresh one.
  • The page loads but sign-in fails. The name you open Protequ on has not been entered under Network access in the installer yet; see the section on the MagicDNS name above.
  • Nothing happens at all. The server may have no outbound internet access; check that HTTPS to Tailscale is allowed.