Last active
March 5, 2024 18:16
-
-
Save willangley/9adf3e34b3c4c7046b1f638647415dae to your computer and use it in GitHub Desktop.
tailscale config for OpenWRT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/init.d/tailscale | |
/etc/rc.d/*tailscale | |
/etc/tailscale/ | |
/lib/upgrade/keep.d/tailscale | |
/usr/sbin/tailscale | |
/usr/sbin/tailscaled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh /etc/rc.common | |
# Copyright 2020 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
USE_PROCD=1 | |
START=80 | |
start_service() { | |
/usr/sbin/tailscaled --cleanup | |
procd_open_instance | |
procd_set_param command /usr/sbin/tailscaled | |
# Set the port to listen on for incoming VPN packets. | |
# Remote nodes will automatically be informed about the new port number, | |
# but you might want to configure this in order to set external firewall | |
# settings. | |
procd_append_param command --port 41641 | |
# OpenWRT /var is a symlink to /tmp, so write persistent state elsewhere. | |
procd_append_param command --state /etc/tailscale/tailscaled.state | |
procd_set_param respawn | |
procd_set_param stdout 1 | |
procd_set_param stderr 1 | |
procd_close_instance | |
} | |
stop_service() { | |
/usr/sbin/tailscaled --cleanup | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note for others who are new to OpenWRT: the directories in
tailscale-keep
are added to/etc/sysupgrade.conf
so that those directories won't be clobbered when updating the OS.