Skip to content

Instantly share code, notes, and snippets.

@Morgyn
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save Morgyn/cee8ed31c1341db55162 to your computer and use it in GitHub Desktop.

Select an option

Save Morgyn/cee8ed31c1341db55162 to your computer and use it in GitHub Desktop.
/etc/dhclient/dhclient.d/dyndns.sh
#!/bin/bash
#
# dyndns.sh: dhclient-script plugin for dyndns
# place in /etc/dhcp/dhclient.d and 'chmod +x dyndns.sh' to enable
USERNAME=
PASSWORD=
TUNNEL_ID=
dyndns_config() {
if [ ! -z "$USERNAME" ] && [ ! -z "$PASSWORD" ] && [ ! -z "$TUNNEL_ID" ]; then
/usr/bin/curl "https://ipv4.tunnelbroker.net/nic/update?username=${USERNAME}&password=${PASSWORD}&hostname=${TUNNEL_ID}"
fi
}
dnsdns_restore() {
/usr/bin/true
}
@Morgyn
Copy link
Author

Morgyn commented Feb 8, 2015

Fedora based script for updating he.net tunnel endpoint

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