0.11.6: UPnP is working (some DD-WRT incompatibility explained)

hi

After upgrade to 0.11.6 (Windows 64 bit) I got new line in syncthing.log:

INFO: UPnP parse: unrecognized UPnP device of type urn:schemas-upnp-org:device:InternetGatewayDevice:1

UPnP still not working. IGD is DD-WRT, other clients (Skype) registers with UPnP successfully Relevant parts from debug log (STTRACE=upnp)

[I3G7R] 2015/05/24 17:41:47.455413 upnp.go:171: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on {EF60D7B5-CFD1-47B3-BBCB-78F72CBF8183}
[I3G7R] 2015/05/24 17:41:47.456414 upnp.go:190: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on {EF60D7B5-CFD1-47B3-BBCB-78F72CBF8183}
[I3G7R] 2015/05/24 17:41:47.456414 upnp.go:171: DEBUG: Starting discovery of device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on {EF60D7B5-CFD1-47B3-BBCB-78F72CBF8183}
[I3G7R] 2015/05/24 17:41:47.457414 upnp.go:190: DEBUG: Sending search request for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on {EF60D7B5-CFD1-47B3-BBCB-78F72CBF8183}
[I3G7R] 2015/05/24 17:41:47.458415 upnp.go:200: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on {EF60D7B5-CFD1-47B3-BBCB-78F72CBF8183}
[I3G7R] 2015/05/24 17:41:47.458415 upnp.go:200: DEBUG: Listening for UPnP response for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on {EF60D7B5-CFD1-47B3-BBCB-78F72CBF8183}
[I3G7R] 2015/05/24 17:41:47.458415 upnp.go:227: DEBUG: Handling UPnP response:

HTTP/1.1 200 OK

Cache-Control: max-age=300

Date: Sun, 24 May 2015 17:41:47 GMT

Ext: 

Location: http://192.168.1.1:1780/InternetGatewayDevice.xml

Server: POSIX UPnP/1.0 DD-WRT Linux/V24

ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1

USN: uuid:85DE4F64-1E22-C4C8-D313-32248BB71AE1::urn:schemas-upnp-org:device:InternetGatewayDevice:1




[I3G7R] 2015/05/24 17:41:47.458415 usage_report.go:144: INFO: Starting usage reporting
[I3G7R] 2015/05/24 17:41:47.458415 upnp.go:227: DEBUG: Handling UPnP response:

HTTP/1.1 200 OK

Cache-Control: max-age=300

Date: Sun, 24 May 2015 17:41:47 GMT

Ext: 

Location: http://192.168.1.1:1780/InternetGatewayDevice.xml

Server: POSIX UPnP/1.0 DD-WRT Linux/V24

ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1

USN: uuid:85DE4F64-1E22-C4C8-D313-32248BB71AE1::urn:schemas-upnp-org:device:InternetGatewayDevice:1




[I3G7R] 2015/05/24 17:41:47.458415 upnp.go:215: INFO: UPnP parse: unrecognized UPnP device of type urn:schemas-upnp-org:device:InternetGatewayDevice:1
[I3G7R] 2015/05/24 17:41:47.536459 upnp.go:398: DEBUG: [http://192.168.1.1:1780/InternetGatewayDevice.xml] Found urn:schemas-upnp-org:service:WANIPConnection:1 with URL http://192.168.1.1:1780/control?WANIPConnection
[I3G7R] 2015/05/24 17:41:47.536459 upnp.go:387: DEBUG: [http://192.168.1.1:1780/InternetGatewayDevice.xml] No services of type urn:schemas-upnp-org:service:WANPPPConnection:1 found on connection.
[I3G7R] 2015/05/24 17:41:47.575482 upnp.go:144: DEBUG: UPnP discovery result 85DE4F64-1E22-C4C8-D313-32248BB71AE1 with services:
[I3G7R] 2015/05/24 17:41:47.575482 upnp.go:146: DEBUG: * [urn:upnp-org:serviceId:WANIPConn1] http://192.168.1.1:1780/control?WANIPConnection
[I3G7R] 2015/05/24 17:41:57.457153 upnp.go:221: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:1 on {EF60D7B5-CFD1-47B3-BBCB-78F72CBF8183} finished.
[I3G7R] 2015/05/24 17:41:57.458153 upnp.go:221: DEBUG: Discovery for device type urn:schemas-upnp-org:device:InternetGatewayDevice:2 on {EF60D7B5-CFD1-47B3-BBCB-78F72CBF8183} finished.
[I3G7R] 2015/05/24 17:41:57.458153 upnp.go:460: DEBUG: SOAP Request URL: http://192.168.1.1:1780/control?WANIPConnection
[I3G7R] 2015/05/24 17:41:57.458153 upnp.go:461: DEBUG: SOAP Action: 
[I3G7R] 2015/05/24 17:41:57.458153 upnp.go:462: DEBUG: SOAP Request:

<?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>25703</NewExternalPort>
    <NewProtocol>TCP</NewProtocol>
    <NewInternalPort>22000</NewInternalPort>
    <NewInternalClient>192.168.1.4</NewInternalClient>
    <NewEnabled>1</NewEnabled>
    <NewPortMappingDescription>syncthing-25703</NewPortMappingDescription>
    <NewLeaseDuration>3600</NewLeaseDuration>
    </u:AddPortMapping></s:Body>
    </s:Envelope>

[I3G7R] 2015/05/24 17:41:57.466158 upnp.go:475: DEBUG: SOAP Response: 200

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<s:Body>

<u:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">

</u:AddPortMappingResponse>

</s:Body>

</s:Envelope>



[I3G7R] 2015/05/24 17:41:57.466158 upnpsvc.go:81: INFO: New UPnP port mapping: external port 25703 to local port 22000.

There is line

INFO: New UPnP port mapping: external port 25703 to local port 22000.

but no mention of it in DD-WRT UPnP status page:

.

P.S. Great job developing Syncthing! Moving from BTSync with ~600GB synced data. So far so good :wink:

That’s odd though, as it actually returns a successful answer to our request to add a mapping…

Thanks, I found that port really is forwarded, iptables -L -t nat shows that. But DD-WRT do not list that in status page and did not save it in nvram.

P.S. My two Android clients also got UPnP mappings in router nat table after upgrading to 0.11.6, but no mention of it in DD-WRT status page. I tried to restart syncthing (Windows 64 bit) and continuously refreshing DD-WRT status page - syncthing-25703 appears for a short time and disappears. Hope this info will help.

Maybe because it’s a time limited port forward as opposed to a permanent one this triggers a dd-wrt display bug? Changing the upnp lease time in syncthings config to zero should request a permanent forward, but if things work I really wouldn’t bother. :wink:

Yes, upnpLeaseMinutes=0 did the trick, thank you.

What DD-WRT build are you using? I’m using 21061 on a WRT610N and it shows up for me. It always has, even back in the 0.10.x series.