Unable to establish connections outside my network

FYI if your device isn’t shown in there use nmap and do a “quick scan plus” to see what ports your router is listening on and you should see one for UPnP.

My router is located at 192.168.0.1 so the command I used was:

nmap -sV -T4 -O -F --version-light 192.168.0.1

And I correctly see my router is listening for UPnP connections

1900/tcp open upnp?

syncthing is indicating it can’t discover the router in question, so this is most likely a UPnP discovery issue. Once the router is properly discovered, port mapping will probably work fine as well.

For debugging UPnP discovery, I usually use the filter udp.port==1900 in Wireshark. UDP port 1900 is the standard port for UPnP broadcast messages such as discovery requests and responses, so this filter should show those requests and responses.

When syncthing initially starts, you should see some packets sent from the local host and responses from your router. The first thing to do is verify you’re actually seeing response packets from the router. This is usually not an issue on a local network.

Assuming you’re getting the response packets, they should have a LOCATION field which gives the root device description URL. If you visit that URL in a browser and paste the contents of that XML file into a pastebin (or similar) and share the link with us, we should be able to get to the bottom of this.

Also, if btsync is generating noise in the Wireshark capture, then it might be worthwhile to disable btsync temporarily while we’re debugging this issue.

For me Google Chrome continuously spams over 1900 trying to discover Chromecast, so I had to be a bit more clever than that.

Yeah, UPnP devices can definitely get noisy! The issue with clever filters is making sure the cleverness doesn’t omit important packets by accident. I tend to prefer using a dumb filter and turning off any noisy services and devices, just to make sure I’m not missing anything.

I’m interested in what results come back from the OP because I’m not sure if you remember @AudriusButkevicius but our UPnP issue magically solved itself. Our logs indicated 0 UPnP devices found but using the tools I’ve mentioned above I could correctly see that UPnP was working.

Maybe a problem with the UPnP discovery part of the code or with certain brands of router?

So my problem turned out to be a buggy router which resets UPnP settings after a reboot. I am claiming that there aren’t any bugs in the UPnP code, there very well might be, or it might just need a longer delay before giving up… But we need some logs or something to be able to figure out what’s happening.

Thanks everyone for the suggestions. I’m not ignoring you, I just haven’t had 5 minutes to test this today, nor will I do for at least tomorrow, but I will update here when I do.

In the meantime I have just tried the nmap scan from my Linux box as that’s a quick test, and apparently port 1900 isn’t open, despite the Draytek configuration claiming it is all enabled, and despite the UPnP scan from my Windows box suggesting that it is too. Suggestions as to why the discrepancy?