opencsi/tailscale

By opencsi

Updated about 2 years ago

Tailscale VPN over amd64, arm64, arm/7, arm/6 (Raspberry Pi)

Image
Networking
0

10K+

opencsi/tailscale repository overview

##WARNING

to upgrade from version 1.22.0 to version 1.24.1 or later it is necessary to delete the tailscale volume.

It will be recreated automatically.

From the Administration panel of Tailscale (https://login.tailscale.com/admin/) it will be necessary to reconfigure the authorized routes and the exit node.

Quick reference

Tags

  • [latest] 1.32.3

  • [stable-LantoLan] 1.32.3

What is Tailscale?

Zero config VPN. Installs on any device in minutes, manages firewall rules for you, and works from anywhere.

Official Site

How to use this image

Prerequisites
  • Auth key from https://login.tailscale.com/admin/authkeys (tskey-12345...)

  • Enable Linux IP forwarding on Docker Host:

    sudo nano /etc/sysctl.conf
    

    Edit value to 1

    net.ipv4.ip_forward = 1 
    

    Save and exit

    Activate the changes

    sudo sysctl -p
    
Run a Container
docker run -d \
       --name tailscale-docker-$HOSTNAME \
       -h tailscale-docker-$HOSTNAME \
       --restart=always \
       -v tailscale:/tailscale \
       --cap-add=NET_ADMIN \
       --network=bridge \
       -e "ROUTES=192.168.0.0/24" \
       -e "AUTHKEY=tskey-12345..." \
       opencsi/tailscale:latest

The bridge network is necessary to give access to the local network.

The tailscale volume saves the tailscale configurations.

The route allows you to access the local network via the vpn. Enter the IP class of your local network. If you have multiple networks: separate the values with a comma (192.168.0.0/24,10.0.0.0/8).

You can also use this container with exit node.

Manage the Tailscale setting from the Admin page.

Tag Lan to Lan

Run the container in lan to lan tag to connect 2 or more site

Site1 (Lan 192.168.0.0)

docker run -d \
       --name tailscale-docker-$HOSTNAME \
       -h tailscale-docker-$HOSTNAME \
       --restart=always \
       -v tailscale:/tailscale \
       --cap-add=NET_ADMIN \
       --network=bridge \
       -e "ROUTES=192.168.0.0/24" \
       -e "AUTHKEY=tskey-12345..." \
       opencsi/tailscale:stable-LantoLan

Site2 (Lan 192.168.1.0)

docker run -d \
       --name tailscale-docker-$HOSTNAME \
       -h tailscale-docker-$HOSTNAME \
       --restart=always \
       -v tailscale:/tailscale \
       --cap-add=NET_ADMIN \
       --network=bridge \
       -e "ROUTES=192.168.1.0/24" \
       -e "AUTHKEY=tskey-12345..." \
       opencsi/tailscale:stable-LantoLan

Site3 (Lan 192.168.2.0)

docker run -d \
       --name tailscale-docker-$HOSTNAME \
       -h tailscale-docker-$HOSTNAME \
       --restart=always \
       -v tailscale:/tailscale \
       --cap-add=NET_ADMIN \
       --network=bridge \
       -e "ROUTES=192.168.2.0/24" \
       -e "AUTHKEY=tskey-12345..." \
       opencsi/tailscale:stable-LantoLan

In each site enable the route to the docker host running the container.

on site1:

route add <lan site2> mask 255.255.255.0 <IP Docker Host on site1>
route add <lan site3> mask 255.255.255.0 <IP Docker Host on site1>

on site2:

route add <lan site1> mask 255.255.255.0 <IP Docker Host on site2>
route add <lan site3> mask 255.255.255.0 <IP Docker Host on site2>

on site3:

route add <lan site1> mask 255.255.255.0 <IP Docker Host on site3>
route add <lan site2> mask 255.255.255.0 <IP Docker Host on site3>
Credit

based of Gruber Dockerfile.

Tag summary

Content type

Image

Digest

sha256:d0e0947e5

Size

30 MB

Last updated

about 2 years ago

docker pull opencsi/tailscale:1.68.2-LantoLan