Created
September 3, 2024 12:45
-
-
Save dewomser/d7e4a3ab4f3ce77bc36ee6f08fc37998 to your computer and use it in GitHub Desktop.
Internet IP aus der Fritzbox holen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl "http://fritz.box: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}\>' | |
Bei mir hat dieser Einzeiler funktioniert. | |
mehr Info und ander Bashzeilen gibts hier: | |
https://wiki.ubuntuusers.de/FritzBox/Skripte/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zu kompliziert ?
curl ifconfig.me