With one router (standard in the UK, the BT Home Hub) I see that Syncthing keeps on trying to open other ports even if the first port mapping succeeds with AddPortMapping (WANIPConnection). It fails right after with WANPPPConnection on the same port (because it is already mapped with the first call) and then switches to another port and the same sequence repeats. I end up with 10 ports opened but Syncthing failing to realize the mappings succeeded.
Is it missing that the WANIP mapping succeeded and reacts to the WANPPP mapping error on the same port?
v0.14.42
[6JY3H] 2017/12/28 07:09:04.683830 upnp.go:421: DEBUG: SOAP Request URL: http://192.168.1.254:46698/ctl/IPConn
[6JY3H] 2017/12/28 07:09:04.683845 upnp.go:422: DEBUG: SOAP Action:
[6JY3H] 2017/12/28 07:09:04.683856 upnp.go:423: 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>65422</NewExternalPort>
<NewProtocol>TCP</NewProtocol>
<NewInternalPort>22000</NewInternalPort>
<NewInternalClient>192.168.1.100</NewInternalClient>
<NewEnabled>1</NewEnabled>
<NewPortMappingDescription>syncthing-65422</NewPortMappingDescription>
<NewLeaseDuration>3600</NewLeaseDuration>
</u:AddPortMapping></s:Body>
</s:Envelope>
[6JY3H] 2017/12/28 07:09:04.867154 upnp.go:432: DEBUG: SOAP Response: 200 OK
<?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:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANPPPConnection:1"/></s:Body></s:Envelope>
[6JY3H] 2017/12/28 07:09:04.867220 upnp.go:421: DEBUG: SOAP Request URL: http://192.168.1.254:46698/ctl/PPPConn
[6JY3H] 2017/12/28 07:09:04.867235 upnp.go:422: DEBUG: SOAP Action:
[6JY3H] 2017/12/28 07:09:04.867247 upnp.go:423: 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:WANPPPConnection:1">
<NewRemoteHost></NewRemoteHost>
<NewExternalPort>65422</NewExternalPort>
<NewProtocol>TCP</NewProtocol>
<NewInternalPort>22000</NewInternalPort>
<NewInternalClient>192.168.1.100</NewInternalClient>
<NewEnabled>1</NewEnabled>
<NewPortMappingDescription>syncthing-65422</NewPortMappingDescription>
<NewLeaseDuration>3600</NewLeaseDuration>
</u:AddPortMapping></s:Body>
</s:Envelope>
[6JY3H] 2017/12/28 07:09:05.039166 upnp.go:432: DEBUG: SOAP Response: 500 Internal Server Error
<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>718</errorCode><errorDescription>ConflictInMappingEntry</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
[6JY3H] 2017/12/28 07:09:05.039314 service.go:312: DEBUG: Error getting new lease on UPnP_BTHomeHub5.0B-1_A8D3F7BE5F5B AddPortMapping: 500 Internal Server Error
[6JY3H] 2017/12/28 07:09:05.039360 upnp.go:421: DEBUG: SOAP Request URL: http://192.168.1.254:46698/ctl/IPConn
[6JY3H] 2017/12/28 07:09:05.039374 upnp.go:422: DEBUG: SOAP Action:
[6JY3H] 2017/12/28 07:09:05.039384 upnp.go:423: 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>55520</NewExternalPort>
<NewProtocol>TCP</NewProtocol>
<NewInternalPort>22000</NewInternalPort>
<NewInternalClient>192.168.1.100</NewInternalClient>
<NewEnabled>1</NewEnabled>
<NewPortMappingDescription>syncthing-55520</NewPortMappingDescription>
<NewLeaseDuration>3600</NewLeaseDuration>
</u:AddPortMapping></s:Body>
</s:Envelope>
[6JY3H] 2017/12/28 07:09:05.269215 upnp.go:432: DEBUG: SOAP Response: 200 OK
<?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:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANPPPConnection:1"/></s:Body></s:Envelope>
[6JY3H] 2017/12/28 07:09:05.269302 upnp.go:421: DEBUG: SOAP Request URL: http://192.168.1.254:46698/ctl/PPPConn
[6JY3H] 2017/12/28 07:09:05.269318 upnp.go:422: DEBUG: SOAP Action:
[6JY3H] 2017/12/28 07:09:05.269332 upnp.go:423: 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:WANPPPConnection:1">
<NewRemoteHost></NewRemoteHost>
<NewExternalPort>55520</NewExternalPort>
<NewProtocol>TCP</NewProtocol>
<NewInternalPort>22000</NewInternalPort>
<NewInternalClient>192.168.1.100</NewInternalClient>
<NewEnabled>1</NewEnabled>
<NewPortMappingDescription>syncthing-55520</NewPortMappingDescription>
<NewLeaseDuration>3600</NewLeaseDuration>
</u:AddPortMapping></s:Body>
</s:Envelope>
[6JY3H] 2017/12/28 07:09:05.659042 upnp.go:432: DEBUG: SOAP Response: 500 Internal Server Error
<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>718</errorCode><errorDescription>ConflictInMappingEntry</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>
[6JY3H] 2017/12/28 07:09:05.659160 service.go:312: DEBUG: Error getting new lease on UPnP_BTHomeHub5.0B-1_A8D3F7BE5F5B AddPortMapping: 500 Internal Server Error
[6JY3H] 2017/12/28 07:09:05.659200 upnp.go:421: DEBUG: SOAP Request URL: http://192.168.1.254:46698/ctl/IPConn
[6JY3H] 2017/12/28 07:09:05.659214 upnp.go:422: DEBUG: SOAP Action:
[6JY3H] 2017/12/28 07:09:05.659224 upnp.go:423: 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>35156</NewExternalPort>
<NewProtocol>TCP</NewProtocol>
<NewInternalPort>22000</NewInternalPort>
<NewInternalClient>192.168.1.100</NewInternalClient>
<NewEnabled>1</NewEnabled>
<NewPortMappingDescription>syncthing-35156</NewPortMappingDescription>
<NewLeaseDuration>3600</NewLeaseDuration>
</u:AddPortMapping></s:Body>
</s:Envelope>