First time I've used a 1.x version (1.0.5) and UPNP is failing with my Netgear router. It was working on the version in the ubuntu repository (0.5.x I think?).
I have done a compile with UPNP logging enabled and it shows the router being sent an extra / in the URL: http://10.10.10.1:80//Public_UPNP_C3
If I try that URL in a browser it comes up with the router login. If I take out the extra / it comes up with a blank page ready for the POST.
Here is the log:
Code: Select all
Nov 20 23:57:28 ==> Broadcasting search for rootdevice
Nov 20 23:57:28 *** add mapping [ proto: tcp ext_port: 57715 local_port :57715 ]
Nov 20 23:57:28 <== (***EDITED***:53347) Device with HTTP method: m-search. Ignoring device
Nov 20 23:57:28 <== (10.10.10.1:1900) Found rootdevice: http://10.10.10.1:80/Public_UPNP_gatedesc.xml total: 0
Nov 20 23:57:28 <== (***EDITED***:9080) Found rootdevice: http://***EDITED***:9000/DeviceDescription.xml total: 1
Nov 20 23:57:30 ==> Broadcasting search for rootdevice
Nov 20 23:57:30 <== (***EDITED***:53347) Device with HTTP method: m-search. Ignoring device
Nov 20 23:57:34 ==> Broadcasting search for rootdevice
Nov 20 23:57:34 <== (***EDITED***:53347) Device with HTTP method: m-search. Ignoring device
Nov 20 23:57:40 ==> Broadcasting search for rootdevice
Nov 20 23:57:40 <== (***EDITED***:53347) Device with HTTP method: m-search. Ignoring device
Nov 20 23:57:40 ==> connecting to http://***EDITED***:9000/DeviceDescription.xml
Nov 20 23:57:40 ==> connecting to http://10.10.10.1:80/Public_UPNP_gatedesc.xml
Nov 20 23:57:40 <== (http://***EDITED***:9000/DeviceDescription.xml) Rootdevice response, did not find a port mapping interface
Nov 20 23:57:40 <== (http://10.10.10.1:80/Public_UPNP_gatedesc.xml) Rootdevice response, found control URL: http://10.10.10.1:80//Public_UPNP_C3 urlbase: http://10.10.10.1:80/ namespace: urn:schemas-upnp-org:service:WANIPConnection:1
Nov 20 23:57:40 ==> connecting to 10.10.10.1
Nov 20 23:57:40 ==> sending: POST //Public_UPNP_C3 HTTP/1.0
Host: 10.10.10.1:80
Content-Type: text/xml; charset="utf-8"
Content-Length: 595
Soapaction: "urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"><NewRemoteHost></NewRemoteHost><NewExternalPort>57715</NewExternalPort><NewProtocol>TCP</NewProtocol><NewInternalPort>57715</NewInternalPort><NewInternalClient>***EDITED***</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>Deluge 1.0.5</NewPortMappingDescription><NewLeaseDuration>3600</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>
Nov 20 23:57:40 <== map response: <html>
<head><title>401 Unauthorized</title></head>
<body><h1>401 Unauthorized</h1>
<p>Access to this resource is denied; your client has not supplied the correct authentication.</p></body>
</html>