Skip to content

Instantly share code, notes, and snippets.

@franzflasch
Last active February 4, 2020 09:37
Show Gist options
  • Save franzflasch/f3300e07882856ff6fc901c5d04a3d32 to your computer and use it in GitHub Desktop.
Save franzflasch/f3300e07882856ff6fc901c5d04a3d32 to your computer and use it in GitHub Desktop.

goip dynamic dns:

prepare curl:

opkg install curl  
opkg install ca-certificates  
opkg install ca-bundle  

goip script:

#!/bin/sh

# No-IP uses emails as usernames, so make sure that you encode the @ as %40
USERNAME="aaaaaaaaa"
PASSWORD="bbbbbbbbb"
SUBDOMAIN="domain.domain.de"

# FAQ
# https://www.goip.de/faq.html

# It is also possible to add the ip as parameter here
# curl --data "username=${USERNAME}&password=${PASSWORD}&subdomain=${SUBDOMAIN}&ip=123.123.123.123" https://www.goip.de/setip?

# However it is not needed, as the site can figure it out without giving it as parameter
curl --data "username=${USERNAME}&password=${PASSWORD}&subdomain=${SUBDOMAIN}" https://www.goip.de/setip?

Useful commands

Get all currently used IPv4 addresses from subnet:

nmap -v -sn -n 192.168.42.0/24 -oG - 2>&1 | awk '/Status: Up/{print $2}' | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"

Get all currently unused IPv4 addresses from subnet:

nmap -v -sn -n 192.168.42.0/24 -oG - 2>&1 | awk '/Status: Down/{print $2}' | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment