Last active
May 25, 2026 23:01
-
-
Save dewomser/d7e4a3ab4f3ce77bc36ee6f08fc37998 to your computer and use it in GitHub Desktop.
Internet IP, Up- und down- Stream aus der Fritzbox holen . Ein Bash einzeiler
This file contains hidden or 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/ |
This file contains hidden or 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 -s "http://192.168.1.1:49000/igdupnp/control/WANCommonIFC1" \ | |
| -H "Content-Type: text/xml; charset=utf-8" \ | |
| -H 'SoapAction: urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1#GetCommonLinkProperties' \ | |
| -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:GetCommonLinkProperties xmlns:u="urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1" /> | |
| </s:Body> | |
| </s:Envelope>' \ | |
| | grep -oP '(?<=NewLayer1)(Up|Down)streamMaxBitRate>\K\d+' | |
| # Beispiel Ausgabe | |
| # 2944000 | |
| # 17280000 |
This file contains hidden or 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 -s http://192.168.1.1:49000/igdupnp/control/WANIPConn1 \ | |
| -H "Content-Type: text/xml; charset=utf-8" \ | |
| -H "SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress" \ | |
| -d '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> | |
| <s:Body><u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"/></s:Body> | |
| </s:Envelope>' \ | |
| | grep -oE '\b[0-9]{1,3}(\.[0-9]{1,3}){3}\b' | |
| # Vorschlag Grok, Hab ich probiert und es funktioniert |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Zu kompliziert ?
curl ifconfig.me