Montag, 16. Mai 2022

IPv4-Adresse (WAN-IP der FRITZ!Box) mit dem Raspberry Pi ermitteln

Meist wird die öffentliche IP-Adresse in der Konfigurationsoberfläche der FRITZ!Box angezeigt und kann von dort ausgelesen werden. Für bestimmte Anwendungsfälle, z.B. den ddclient auf einem Raspberry Pi kann folgendes Script verwendet werden:

wget -qO- "http://fritz.box:49000/igdupnp/control/WANIPConn1" --header "Content-Type: text/xml; charset="utf-8"" --header "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress" --post-data="<?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <u:GetExternalIPAddress xmlns:u='urn:schemas-upnp-org:service:WANIPConnection:1' /> </s:Body> </s:Envelope>"  | grep -Eo '<[[:digit:]]{1,3}(.[[:digit:]]{1,3}){3}>'
curl "http://192.168.178.1:49000/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress" -d "<?xml version='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <u:GetExternalIPAddress xmlns:u='urn:schemas-upnp-org:service:WANIPConnection:1' /> </s:Body> </s:Envelope>" -s | grep -Eo '<[[:digit:]]{1,3}(.[[:digit:]]{1,3}){3}>'
Dienstag, 4. Januar 2022

Mein privater Blog ist wieder online!

Nach Upgrade von Debian 10/Buster auf 11/Bullseye habe ich ebenfalls meine Website modernisiert. Nun kannst du sie auch mit dem Mobile-Device ansehen; ohne „Augenmassaker“. Mit einigen Anpassungen ist nun auch der HTML- und CSS-Code weitgehend valide. Ein Upgrade auf des aktuelle Nextcloud-Release 23 steht noch aus. Der Host war und bleibt ein Raspberry Pi 4. Mehr Rechenleistung ist vorerst nicht notwendig; und der Stromverbrauch bleibt unter Last mit ca. 885mA gering.

Tag(s): Blog, CMS, Raspberry