Created
May 25, 2020 06:02
-
-
Save steshaw/4fb376d3ee6ccd866b19ff5ff2be9fa1 to your computer and use it in GitHub Desktop.
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/bash | |
# custom startup script for GCP (in metadata) | |
tailscale up --advertise-routes=10.0.0.0/8,172.16.0.0/24 | |
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward | |
echo 0 | sudo tee /proc/sys/net/ipv4/conf/tailscale0/rp_filter | |
iptables -t nat -A POSTROUTING -j MASQUERADE | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment