TechSomething

tailcat

goal #

connecting 2 machines without exposing ports,
the aim is to allow a proxmox host to backup to a proxmox backup server using tailcat

tailcat is a tool that leverages tailscale network without crating a tailnet or additional steps

in this guide we'll set it up with persistence se at the restart of the service the keys remain the same

prerequisites #

two linux machines, in my case two debian 13, which we will refer to as:

step 1 - download and install #

download and install tailcat on both machines,
download from tailcat's git releases: https://github.com/tailscale/tailcat/releases

wget https://github.com/tailscale/tailcat/releases/download/v0.7.0/tailcat_0.7.0_linux_amd64.deb
apt install ./tailcat_0.7.0_linux_amd64.deb

step 2 - keygen on server #

create the keys on the server

tailcat genkey --key=default --fixed-region

the command output will a long string strating with "tc", save it.

step 3 - keygen on client #

create the keys on the client

tailcat genkey --client --key=client-default

the command output will be a string like "nodekey:abc123..." save it.

step 4 - manual start on server #

start the shareing manually on the server:

tailcat serve --key=default --allow=nodekey:abc123...321dcba 8007

replace the nodekey with the one save from step 3

8007 is the port of the service you want to share

step 5 - manual start on client #

tailcat forward tc.. 18007:8007

replace "tc.." with the key save in step 2

18007:8007 means that we are forwarding locally, on port 18007, the remote port 8007

so we'll be able to reach the remote Proxmox backup server on our localhost:18007

and we can test it with curl:

#curl -k https://127.0.0.1:18007/api2/json/version
authentication failed

which is prefectly fine since we are not providing any auth

step 6 - systemd units on server #

we can create the systemd units on the server to have the tailcat share start automatically

edit

/etc/systemd/system/tailcat-pbs-server.service

[Unit]
Description=Tailcat tunnel server for PBS
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/tailcat serve --key=default --allow=nodekey:abcd123...321dcba 8007
Restart=always
RestartSec=5
User=root

[Install]
WantedBy=multi-user.target
systemctl enable --now tailcat-pbs-server.service

if you need multiple port you can add those with a comma: 8007,8008

if you need multiple keys you can add them with a comma: --allow=nodekey:abcd123...321dcba,nodekey:key2

step 7 - systemd units on client #

we can automate the start of the service on the client aswell, edit:

/etc/systemd/system/tailcat-pbs-forward.service

[Unit]
Description=Tailcat forward to PBS server
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/tailcat forward tc.. 18007:8007
Restart=always
RestartSec=5
User=root

[Install]
WantedBy=multi-user.target
systemctl enable --now tailcat-pbs-forward.service

to forward multiple ports in the same systemd units replace "18007:8007" with "18007:8007 18008:8008"

step 8 - enjoy #

I've found it trivial to connect two machines with tailcat and I like the tool,
the speed seems suitable for a backup (~10MBps = ~80mbps),
given I already had a full backup in place so I just moved the delta between the machines.