Syncthing: Syncthing 1.7.0 performs UPnP with NAT traversal disabled

Created on 9 Jul 2020  ·  3Comments  ·  Source: syncthing/syncthing

  • Syncthing Version: 1.7.0
  • Browser: Any
  • What Happens:

    Syncthing Settings --> Connections Tab
    Sync Protocol Listen Address: default
    Unticked/Disabled: Enable NAT Traversal, Global Discovery, Enable Relaying
    Ticked/Enabled: Local Discovery
    Syncthing whilst only Local Discovery is enabled will use UPNP and commit port forwarding as If nothing was enforced (Only Local Discovery enabed) .

    • What you expected to happen instead:
      Setting only Local Discovery and keeping Disabled Enable NAT Traversal, Global Discovery, Enable Relaying
      Syncthing was only limited within the bounds of internal network and never acted on Its own and/or tried to open any outside ports (port forward).

This issue happens on all Syncthing 1.7.0 flavours (Linux, Android etc)
All devices are mass opening ports by means of UPNP with outside world even though ONLY Local Discovery is the only setting enabled.

Disabling Completely TCP in "Sync Protocol Listen Address" and having only quic enabled
meaning: Sync Protocol Listen Address: From default To quic://0.0.0.0:22000 or quic://10.11.10.xx
thus specifying ONLY quick mitigates Issue of forced port forwarding/opening outside ports/use of UPNP even though "Local Discovery" is the only setting in Enabled state.

What’s the point of having a “Local Discovery” setting if It keeps port forwarding/opening outside ports/uses UPNP.

  • any steps to reproduce the problem:
    >Clean Install Syncthing (I did this twice)
    >Syncthing Settings --> Connections Tab
    >Sync Protocol Listen Address: default
    >Unticked/Disabled: Enable NAT Traversal, Global Discovery, Enable Relaying
    >Ticked/Enabled: Local Discovery
    >Restart If necessary Syncthing and observe for any open ports
bug

All 3 comments

Retitled for the actual issue as I understand it, local discovery having nothing to do with whether we try UPnP or not.

Can confirm lots of output with STTRACE=upnp and <natTraversal>false</natTraversal> in 1.7.0, which is not the case in 1.6.1.

When making the nat a service I stopped the timer when nat is disabled. However that timer gets reset on an exported method, effectively reenabling nat. Will fix.

Was this page helpful?
0 / 5 - 0 ratings