git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
This is a bash script to act as a Cloudflare DDNS client, useful replacement for ddclient.
This gist will no longer update, instead please go to https://github.com/lifehome/systemd-cfddns for more updated versions.
cfupdater files to /usr/local/bin-v4 to cfupdater in the following systemd service unit.| # attempt 6, success | |
| # relies on Magisk auto start script | |
| # pause script to give wireguard time to autostart | |
| bullhead:/ # cat /data/adb/service.d/prep_gateway.sh | |
| #!/system/bin/sh | |
| sleep 2m | |
| su -c 'iptables -F tetherctrl_FORWARD' | |
| su -c 'sysctl -w net.ipv4.ip_forward=1' | |
| su -c 'iptables -A FORWARD -i tun0 -j ACCEPT' | |
| su -c 'iptables -t nat -A POSTROUTING -o rmnet_data0 -j MASQUERADE' |
Just thought I'd put together some detail on deploying Tailscale using Docker and Portainer. These bits-and-pieces are available elsewhere, but not together, so hopefully this will save someone a bit of time if you'd like to add Tailscale to an existing Docker install:
Here's my annotated recommended docker-compose, to use with Portainer-Stacks. Note that I'm not using a pre-made Auth Key. I started that way, but realized it was very easy to simply check the Portainer log for the tailscaled container once the stack is running. In that log you'll see the standard Auth link that you can use to authorize the container. This way you don't need to create a key in advance, or create a reusable key that introduces a security risk:
version: '3.9'
services:
tailscale:
image: tailscale/tailscale
container_name: tailscaled