Skip to content

Instantly share code, notes, and snippets.

@mxswd
Last active December 22, 2015 02:39
Show Gist options
  • Save mxswd/6404993 to your computer and use it in GitHub Desktop.
Save mxswd/6404993 to your computer and use it in GitHub Desktop.

Set static IP on the network for the server. Enable L2TP VPN. Port forward TCP 1723, UDP 500, UDP 1701, UDP 4500.

# crontab -e
3 * * * * /Users/maxs/update-dns.sh > /dev/null 2>&1
#!/bin/bash
LOGIN=""
PASSWORD=""
DOMAIN_ID="something.omg"
RECORD_ID="yo"
IP="`curl http://icanhazip.com/`"
curl -H "Accept: application/json" \
--basic -u "$LOGIN:$PASSWORD" \
-H "Content-Type: application/json" \
-i -X PUT https://dnsimple.com/domains/$DOMAIN_ID/records/$RECORD_ID \
-d {\"record\":{\"content\":\"$IP\"}}
@mxswd
Copy link
Author

mxswd commented Sep 3, 2013

web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment