Unable to establish connections outside my network

I have a mixture of machines (x86/AMD64/ARM, Linux/Windows/Android) within my network, and haven’t had any issues getting them all to communicate with each other. However am getting nowhere getting things outside the LAN to connect. All are connected to the discovery server fine, and indeed I have even installed discosrv on an Internet facing server so I can view connections to it to verify this.

I think that my network configuration is the issue but I don’t know enough about how uPNP works to be sure.

My default gateway (Draytek ADSL router) load shares across multiple WAN ports. WAN1 is my ADSL line, WAN2 is a link to a second ADSL router. uPNP is enabled (for WAN1).

I cannot (or at least don’t wish to) control which route traffic from my various LAN hosts takes to reach the Internet.

What do I need to modify at my LAN end to get this to work? (To keep things “simple”, consider just my Linux AMD64 desktop on the LAN and my Android mobile over 4G for now.)

This probably isn’t useful info but BTSync works fine on the same network. For a whole host of reasons I would rather use SyncThing though.

PS: I have v0.10.9 throughout.

Is UPnP actually succeeding to get a port mapping?

How do I find out? Is that something I can see within Syncthing or do I need to find it somewhere in the router?

It says in the log as syncthing starts.

I guess not:

INFO: UPnP discovery complete (found 0 devices)

UPnP is enabled in the router, what else do I check?

Well, you can set up manual port forwarding on the router, that would be your best bet. Otherwise you can dwell into network packet capture, but I am not sure how technical you are.

As far as that is concerned, “moderately” technical. It wouldn’t be the first time I used wireshark, for example, but I’d need to be told what to look for.

For Syncthing to work over the internet you need to have a least one node with portforwarding. e.g.

your nodes - ROUTER 1 - Internet - ROUTER 2 - othernode:port12345

so on your nodes you need to enter the remoteip:12345 of #2 and on router #2 you need to forward the external port 12345 to othernode:12345

1 Like

I thought that the point of UPnP was to get around that (or, more specifically, to ensure that the port forwarding existed by setting it up automatically)?

I’m intrigued as to why UPnP doesn’t seem to be working and how I can investigate further. Also, I have established that btsync also doesn’t succeed in setting up UPnP (so it’s likely a network issue not a syncthing one), but btsync works without any other forwarding; what is it doing differently?

Mark

Depending on your router, it might not be using UPnP as there are other alternatives for requesting port forwarding (which syncthing does not currently support, as we are probably move to UDP in the long term which will make port forwarding point redundant).

Also, I am not familiar with how BTSync works, but it might use UDP and UDP punch through which solves the issue. Perhaps it supports using relay server?

As for wireshark, I suggest you download a simple UPnP test utility to see if it finds anything.

I have no experience with UPnP, can you point me to a suitable test utility? Or any tools in general for debugging UPnP issues?

This worked well for me on Windows.

Thanks, downloaded and running on my Windows box. But I’m not sure what I should be looking for?

Under .All I only see some local stuff (Samsung Kies, Windows media player), but under Internet gateway Devices I seem my Draytek router (“Draytek Internect Connection Sharing”). But I don’t know what I’m looking at (or looking for).

There should be a list of services the device provides via UPnP, that’s what we are interested in. I am talking from memory, I already forgot what the UI looks like.

I was having similar issues not too long ago and this was the UPnP too I used: Certain clients unable to connect to eachother

The list of services (assuming I’m looking at the right thing) is:

  • WanDevice
    • WANConnectionDevice
      • WANDSLLinkConfig
      • WANPPPConnection - in Properties for this it lists PortMapping and includes several maps for BitTorrent Sync and uTorrent across my Windows and Linux desktop PCs (nothing for syncthing)
    • WANCommonInterfaceConfig
  • OSInfo

I’m a new user so although I can export what UPnP Tester tells me I can’t upload it here :frowning:

Then I guess you might need to dwell down into wireshark to debug it, as if others are able to get the mappings, it means we’re doing something wrong (or not giving enough time). I cannot remember the exact filters you need, I know it was quite complicated as the request was done on a random port and the response arrived on the same random port.

Perhaps @cqcallaw can give more guidance?

You can upload to imgur or pastebin or whatever, and just provide a link here. You can also use the tool @Rewt0r suggests, as it seems to have a more simple UI.

I’m a bit confused by @Rewt0r - the link is to the same tool I’m using which doesn’t match the screenshot (which I agree looks simpler).

I’d welcome suggestions for Wireshark filters. The best I’ve found so far is: ((udp contains “HTTP/1.1”) and ((udp contains 0a:53:54:3a) or (udp contains 0a:59:54:3a))) … which throws up quite a lot of traffic for btsync but nothing at all for syncthing. But from what has been said in this thread you currently use TCP not UDP. (s/udp/tcp in the above doesn’t get me anything either).

I used this: http://wiki.wireshark.org/SSDP

I think I did it according the response IP or response src port or something like that to get the right response.

On the tool I linked to once opened it should present you with visible UPnP devices:

I’m with Virgin Media in the UK so I can see my Router the VMDG490. You need to find the WANIPConnection part as highlighted in my image, right-click -> properties and see if anything is added under the “Port Mapping” tab