Skip to content

Instantly share code, notes, and snippets.

on idle
# Change these to your VPN's IP Address, and the VPN's name in your Mac's Network System Prefernces panel.
set vpnIPAddress to "111.222.333.444"
set vpnServiceName to "AlgoVPN"
set myIP to "127.0.0.1"
set shellScriptCommands to {¬
"dig +short myip.opendns.com @resolver1.opendns.com", ¬
"dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'\"' '{ print $2}'", ¬
"curl ifconfig.me", ¬
@ilyaglow
ilyaglow / networkd_ip_forwarding.sh
Last active February 9, 2021 19:18
Turn on IP forwarding on external interface using systemd-networkd
echo "IPForward = yes" >> /etc/systemd/network/"$(ip route get 8.8.8.8 | head -n1 | cut -d ' ' -f5)".network && systemctl restart systemd-networkd