#!/bin/bash #internal IP-address of the fritz-box FBIP=192.168.x.x # Von http://wiki.ubuntuusers.de/FritzBox/Skripte /usr/bin/curl "http://$FBIP:49000/upnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress" -d " " -s | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'