Skip to content

Instantly share code, notes, and snippets.

@dewomser
Created September 3, 2024 12:45
Show Gist options
  • Save dewomser/d7e4a3ab4f3ce77bc36ee6f08fc37998 to your computer and use it in GitHub Desktop.
Save dewomser/d7e4a3ab4f3ce77bc36ee6f08fc37998 to your computer and use it in GitHub Desktop.
Internet IP aus der Fritzbox holen
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/
@dewomser
Copy link
Author

Zu kompliziert ?
curl ifconfig.me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment