Skip to content

Instantly share code, notes, and snippets.

@dewomser
Created September 3, 2024 12:45
Show Gist options
  • Select an option

  • Save dewomser/d7e4a3ab4f3ce77bc36ee6f08fc37998 to your computer and use it in GitHub Desktop.

Select an option

Save dewomser/d7e4a3ab4f3ce77bc36ee6f08fc37998 to your computer and use it in GitHub Desktop.

Revisions

  1. dewomser created this gist Sep 3, 2024.
    6 changes: 6 additions & 0 deletions fritzbox_ip.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    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/