I'm trying to replace my openvpn set up with tailscale, where i have the ability to connect to various self hosted apps on a server at home from my mobile when i'm not on wifi.
To confirm, i want to be able to connect tailscale on my phone, then go to a browser and type for example 192.168.68.220:8080 and have it connect to that address and port on my home server.
I have various apps on multiple ports on this server and want to be able to connect to all.
From my limited understanding, i should be able to do this by creating a tailscale container on the server and then setting it up as a subnet router?
I use portainer to create and edit docker compose files in stacks and would prefer to do as much in portainer as possible.
I have successfully created a tailscale docker container using the authkey docker compose:
'''
version: "3.7"
services:
ts-authkey-test:
image: tailscale/tailscale:latest
container_name: ts-authkey-test
hostname: banana
environment:
- TS_AUTHKEY=tskey-auth-123456789
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
volumes:
- /home/cam/appdata/tailscale:/var/lib/tailscale
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
privileged: true
restart: unless-stopped
'''
I'm now following https://tailscale.com/kb/1019/subnets and trying to do the next step - enable IP forwarding however am stuck. I assume i need to start with:
'''
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
'''
However when i go to the container in portainer and try exec in the console i get error:
OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown
Does anyone have any tips or can you point me to a guide that does what i want to do?
Thanks