Eu usei ajmitch 's responder e alguns scripts para fazer isso. (Se alguém tiver uma maneira melhor de obter o endereço, eu ficaria feliz em ouvi-lo.) Você precisará instalar o curl
#! /bin/sh
# (C) 2011 Erik B. Andersen <[email protected]>
# Licensed under the latest version of the GPL as published by the Free Software Foundation
# Don't bother to reload when lo is configured.
if [ "$IFACE" = lo ]; then
echo "Interface lo; skipping"
exit 0
fi
if [ ! -e /usr/bin/curl ]; then
echo "Curl not installed; skipping"
exit 0
fi
if [ ! -e /sbin/ifconfig ]; then
echo "Ifconfig not installed; skipping"
exit 0
fi
if [ ! -e /bin/grep ]; then
echo "Grep not installed; skipping"
exit 0
fi
if [ ! -e /usr/bin/tr ]; then
echo "Tr not installed; skipping"
exit 0
fi
if [ ! -e /usr/bin/tail ]; then
echo "Tail not installed; skipping"
exit 0
fi
Hostname="something.example.org"
Password="something"
Interface="wlan0"
echo "Running curl"
curl --interface $(/sbin/ifconfig ${Interface} | /bin/grep "Global" | /usr/bin/tr "/" "\n" | /usr/bin/tr " " "\n" | /bin/grep "ff:fe"| /usr/bin/tail -n 1) -6 http://${Hostname}:${Password}@dyn.dns.he.net/nic/update?hostname=${Hostname}
exit 0