/etc/ddclient.conf
# Configuration file for ddclient generated by debconf # # /etc/ddclient.conf pid=/var/run/ddclient.pid protocol=dyndns2 use=cmd, cmd=/root/bin/getip.sh server=members.dyndns.org login=*** password='******' ***.dyndns.org
/root/bin/getip.sh
#!/bin/sh wget http://192.168.1.1 -q -O - | grep "if('Up" | sed -e "s/.*dw('\(.*\)'.*/\1/;" | head -n 2 | tail -n 1
Alternativ über entsprechende Seiten im Internet:
#!/bin/sh curl -s http://checkip.dyndns.org | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
#!/bin/sh lynx -dump http://checkip.dyndns.org | sed -n '/Current/s/.*: \([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\)/\1/p'
#!/bin/sh wget http://www.whatismyip.org/ -qO - | html2text