2
0
mirror of https://github.com/pikvm/pikvm synced 2024-11-16 12:12:57 +00:00
pikvm/docs/tailscale.md

72 lines
2.3 KiB
Markdown
Raw Normal View History

2021-10-12 18:45:00 +00:00
# Tailscale VPN
2023-08-18 10:21:12 +00:00
The [Tailscale VPN](https://tailscale.com/) can be used to access PiKVM from the Internet
2023-08-25 20:26:49 +00:00
if configuring [port forwarding](port_forwarding.md) is not possible or more security is desired.
2023-08-18 04:54:46 +00:00
Tailscale is a convenient and free (for private use) tool for organizing a small VPN network.
2021-10-12 18:45:00 +00:00
2023-08-25 20:26:49 +00:00
The basic Tailscale configuration commands are shown below.
For detailed instructions, refer to [Tailscale support](https://tailscale.com/contact/support/).
2023-08-18 04:54:46 +00:00
2023-08-18 10:21:12 +00:00
-----
## Configuring the PiKVM
2021-10-12 18:45:00 +00:00
2024-02-17 23:03:42 +00:00
1. Update OS:
{!_update_os.md!}
2. Install the Tailscale client, run `tailscaled` service and register it in the network:
2021-10-12 18:45:00 +00:00
2023-08-20 04:43:09 +00:00
```console
2023-08-18 10:21:12 +00:00
[root@pikvm ~]# rw
[root@pikvm ~]# pacman -S tailscale-pikvm
[root@pikvm ~]# systemctl enable --now tailscaled
[root@pikvm ~]# tailscale up
2021-10-12 18:45:00 +00:00
```
2024-02-17 23:03:42 +00:00
3. Follow the link to authorize this installation.
2023-08-25 20:26:49 +00:00
You likely want to [disable key expiry](https://tailscale.com/kb/1028/key-expiry/)!
2021-10-12 18:45:00 +00:00
2024-02-17 23:03:42 +00:00
4. After authorization success, reboot to make sure that everything works correctly:
2023-08-18 04:54:46 +00:00
2023-08-20 04:43:09 +00:00
```console
2023-08-19 03:55:15 +00:00
[root@pikvm ~]# reboot
```
2024-02-17 23:03:42 +00:00
5. Now, you can view the IP address of the Tailscale network interface:
2023-08-19 03:55:15 +00:00
2023-08-20 04:43:09 +00:00
```console
2023-08-19 03:55:15 +00:00
[root@pikvm ~]# ip addr show tailscale0
```
2021-10-12 18:45:00 +00:00
2023-08-18 05:04:25 +00:00
If everything is successful, PiKVM will become a member of your VPN network.
2023-08-20 04:49:44 +00:00
!!! warning "Do not update Tailscale if you don't have access to PiKVM without VPN"
2023-08-25 20:26:49 +00:00
Unfortunately, sometimes, updating the Tailscale client can cause problems due to breaking changes.
2023-08-28 13:10:32 +00:00
These are compatibility issues on the Tailscale side.
2023-08-25 20:26:49 +00:00
Remember this when updating.
2021-10-12 18:45:00 +00:00
2023-08-18 10:21:12 +00:00
-----
## Configuring a client device
2023-08-18 04:54:46 +00:00
2023-08-25 20:26:49 +00:00
* [Download](https://tailscale.com/download) and install the Tailscale client
2023-08-18 04:54:46 +00:00
to the system you are using (not to the system you want to control).
2023-08-25 20:26:49 +00:00
* Check the [Tailscale admin page](https://login.tailscale.com/admin/machines) to view your VPN network.
* Follow the URL in the web browser: `https://<tailscale_kvm_ip>` and you will see the PiKVM web interface.
2023-08-18 04:54:46 +00:00
2023-08-18 10:21:12 +00:00
-----
2023-08-18 04:54:46 +00:00
## Troubleshooting
2023-08-25 20:26:49 +00:00
If something does not work, the usual advice is to completely remove Tailscale from PiKVM and perform a clean installation:
2023-08-18 04:54:46 +00:00
2023-08-20 04:43:09 +00:00
```console
2023-08-18 10:21:12 +00:00
[root@pikvm ~]# rw
[root@pikvm ~]# pacman -Rscnd tailscale
[root@pikvm ~]# rm -rf /var/lib/tailscale /var/cache/tailscale
[root@pikvm ~]# reboot
2023-08-18 04:54:46 +00:00
```
2023-08-25 20:26:49 +00:00
Now, follow the instructions from the beginning to re-install Tailscale.