Ankündigung

Einklappen
Keine Ankündigung bisher.

AVM Plugin

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Onkelandy
    antwortet
    Hm, beim ersten Curl war ein Leerzeichen zu viel, aber nachdem ich das raus nehme, bekomme ich immer einen 502 XML Error. Gabs da beim Copy Paste noch n anderes Problem vielleicht?

    Das hier kommt bei beiden Befehlen retour..
    Code:
    <?xml version="1.0"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <s:Body>
    <s:Fault>
    <faultcode>s:Client</faultcode>
    <faultstring>UPnPError</faultstring>
    <detail>
    <UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
    <errorCode>502</errorCode>
    <errorDescription>XML error</errorDescription>
    </UPnPError>
    </detail>
    </s:Fault>
    </s:Body>
    </s:Envelope>

    Einen Kommentar schreiben:


  • psilo
    antwortet
    Hier mal das Beispiel für AddPortMapping:
    Code:
    curl --anyauth -u user:'password' "https://192.168.178.1:49443/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping" -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:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"><New RemoteHost>84.141.226.32</NewRemoteHost><NewExternalPort>1234</NewExternalPort><NewProtocol>TCP</NewProtocol><NewInternalPort>1234</NewInternalPort><NewInternalClient>192.168.178.100 </NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>test</NewPortMappingDescription><NewLeaseDuration>12</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>" -s -k
    Ich bekomme das hier zurück:
    Code:
    <?xml version="1.0"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <s:Body>
    <s:Fault>
    <faultcode>s:Client</faultcode>
    <faultstring>UPnPError</faultstring>
    <detail>
    <UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
    <errorCode>403</errorCode>
    <errorDescription>Not available Action</errorDescription>
    </UPnPError>
    </detail>
    </s:Fault>
    </s:Body>
    </s:Envelope>

    Einen Kommentar schreiben:


  • psilo
    antwortet
    das hier scheint zu gehen, ich kriege aber bei 1 oder 0 immer: SpecifiedArrayIndexInvalid als Fehler.. Du?

    Code:
    curl --anyauth -u user:'password' "https://192.168.178.1:49443/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetGenericPortMappin gEntry" -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:GetGenericPortMappingEntry xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1#GetGenericPortMappin gEntry"><NewPortMappingIndex>1</NewPortMappingIndex></u:GetGenericPortMappingEntry></s:Body></s:Envelope>" -s -k

    Einen Kommentar schreiben:


  • psilo
    antwortet
    Ich versuch Dir das CURL für GetGenericPortMappingEntry zu bauen. Ich update nachher hier.

    Einen Kommentar schreiben:


  • Onkelandy
    antwortet
    Hab mir jetzt mal das
    igdconnSCPD.xml von der Fritzbox geholt und angesehen. Da sollte ja alles gelistet sein, was die Fritze unterstützt. Die meisten Sachen tun auch. Blöde Frage - wie kann ich denn ein Argument mit angeben? Also zB bei GetGenericPortMappingEntry muss NewPortMappingIndex mit angegeben werden. Wo würde ich das beim curl dranhängen?

    Hätte mir das hier noch gerne angesehen, aber bei meinem nginx wird nur der Inhalt der PHP Datei angezeigt (nicht der ganze): https://www.symcon.de/forum/threads/...990#post235990
    Zuletzt geändert von Onkelandy; 25.07.2020, 21:07.

    Einen Kommentar schreiben:


  • Onkelandy
    antwortet
    wvhn Im Admin Interface der Fritzbox gibt es eben diese Bezeichnungen nicht. LeaseTime kenne ich von WLAN oder DHCP, bei der Portfreigabe scheint es mir wenig sinnvoll - aber wir schauen mal, ob sich da über ne Abfrage was rauslesen lässt.

    psilo Leider gleichen Effekt wie bei dir. Hier steht was von Userzugang.. https://wiki.fhem.de/wiki/FRITZBOX#T...invalid_action Aber ich hab bei mir die Fritzbox komplett resettet und quasi jungfräulich ohne PW und ohne User (Zugang nur innerhalb LAN)

    Einen Kommentar schreiben:


  • wvhn
    antwortet
    LeaseDuration ist die Dauer, für die ein Client am Router zugelassen ist. Nach Ablauf dieser Zeit wird der Client deaktiviert - ggfls. auch gelöscht. Je nach Einstellung des Routers können Clients ihren Lease selbst erneuern, oder dies muss manuell über das Admin Interface des Routers gemacht werden.
    Im Admin Interface des Routers sollte man sehen können, welche Werte Für die LeaseDuration zulässig sind.

    (Bitte die Antwort einfach löschen, wenn sie banal / nicht hilfreich ist und ich Euch falsch verstanden habe)

    Gruß
    Wolfram

    Einen Kommentar schreiben:


  • psilo
    antwortet
    eine reihe der curls geht bei mir nicht, kannst du mal testen? laut https://avm.de/fileadmin/user_upload...ipconnSCPD.pdf gibt es sowohl die die gehen, als auch die die nicht gehen.

    user, passwort und ip halt anpassen.

    Code:
    curl --anyauth -u user:'password' "https://192.168.178.1:49443/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetInfo" -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:GetInfo xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /></s:Body></s:Envelope>" -s -k
    -> geht nicht, invalid action
    
    curl --anyauth -u user:'password' "https://192.168.178.1:49443/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetPortMappingNumberOfEntries" -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:GetPortMappingNumberOfEntries xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /></s:Body></s:Envelope>" -s -k
    -> geht nicht, invalid action
    
    curl --anyauth -u user:'password' "https://192.168.178.1:49443/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 -k
    -> geht
    
    curl --anyauth -u user:'password' "https://192.168.178.1:49443/igdupnp/control/WANIPConn1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetStatusInfo" -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:GetStatusInfo xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /></s:Body></s:Envelope>" -s -k
    -> geht
    Zuletzt geändert von psilo; 24.07.2020, 09:26.

    Einen Kommentar schreiben:


  • Onkelandy
    antwortet
    Hm, etwas kryptisch Wie wärs wenn wir mal mittels GetGenericPortMappingEntry ein Mapping auslesen und gucken?
    NewInternalClient wird wohl die IP Adresse des internen Geräts sein, an das es weitergeleitet wird oder auch Hostname.
    LeaseDuration keinen Schimmer - da könnte man ja einfach mal 1000 eingeben, hehe und gucken.

    Einen Kommentar schreiben:


  • psilo
    antwortet
    hmm das ding programmieren ist das eine, die parameter zu verstehen das andere. vielleicht kriegen wir zusammen raus, was das alles ist?

    insbes. NewInternalClient und NewLeaseDuration ? Setzen muss ich im SOAP request offenbar alle

    NewRemoteHost in RemoteHost
    NewExternalPort in ExternalPort
    NewProtocol in PortMappingProtocol
    NewInternalPort in InternalPort
    NewInternalClient in InternalClient
    NewEnabled in PortMappingEnabled
    NewPortMappingDescription in PortMappingDescription
    NewLeaseDuration in PortMappingLeaseDuration

    Einen Kommentar schreiben:


  • Onkelandy
    antwortet
    Zitat von psilo Beitrag anzeigen

    kann aber mal testweise die funktion add und remove implementieren, wenn du sie dann freundlicherweise testen würdest ;-)
    Deal!
    Redirect check ich dann, falls es nicht klappt Danke!!!!

    Einen Kommentar schreiben:


  • psilo
    antwortet
    warum redirectest du port 80 nicht auf 443? ich glaube ich habe das so und das funktioniert super ;-) bei mir ist der shng rechner aber nicht der, wo nginx läuft. das ist ja auf nem sep. raspi. daher hätte ich derzeit keinen benefit von der funktion. wenn ich den nginx mal dockerisiere, vielleicht.

    kann aber mal testweise die funktion add und remove implementieren, wenn du sie dann freundlicherweise testen würdest ;-)

    Einen Kommentar schreiben:


  • Onkelandy
    antwortet
    Also die Einschränkung von oben sehe ich jetzt nicht so als Problem. Ich möchte eigentlich nur für den Raspi im LAN kurzzeitig das Portmapping auf Port 80 aktivieren, wenn certbot das Zertifikat erneuert und dann wieder deaktivieren. Ist zwar recht eingeschränktes Szenario, das dann funktioniert, aber immerhin

    Einen Kommentar schreiben:


  • psilo
    antwortet
    hmmm habs jetzt am pc nochmal in ruhe durchgelesen. meine idee mit add und delete geht wohl nicht: Port mapping entries are only allowed for hosts inside of LAN. Furthermore hosts can only add port mapping entries for themselves and not for other hosts in the LAN. It is not intended to allow port mapping entries for the guest network or hosts with IP addresses routed into WAN.

    alle anderen services sind nur GET-servies, die infos auslesen.

    Einen Kommentar schreiben:


  • psilo
    antwortet
    Onkelandy das plugin kann es (noch) nicht. Tr064 muesste es aber hergeben: https://avm.de/fileadmin/user_upload...ipconnSCPD.pdf

    Was denkst du?

    Das in deinem link macht das ueber die webseite. Das ist imho instabil, da die dauernd was aendern

    Einen Kommentar schreiben:

Lädt...
X