syncthing-networking.7 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-NETWORKING" "7" "October 28, 2016" "v0.14" "Syncthing"
  4. .SH NAME
  5. syncthing-networking \- Firewall Setup
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH PORT FORWARDS
  34. .sp
  35. If you have a NAT router which supports UPnP, the easiest way to get a working
  36. port forward is to make sure UPnP setting is enabled on both Syncthing and the
  37. router – Syncthing will try to handle the rest. If it succeeds you will see a
  38. message in the console saying:
  39. .INDENT 0.0
  40. .INDENT 3.5
  41. .sp
  42. .nf
  43. .ft C
  44. Created UPnP port mapping for external port XXXXX on UPnP device YYYYY.
  45. .ft P
  46. .fi
  47. .UNINDENT
  48. .UNINDENT
  49. .sp
  50. If this is not possible or desirable you should set up a port forward for port
  51. \fB22000/TCP\fP, or the port set in the \fISync Protocol Listen Address\fP setting.
  52. The external forwarded port and the internal destination port has to be the same
  53. (i.e. 22000/TCP).
  54. .sp
  55. Communication in Syncthing works both ways. Therefore if you set up port
  56. forwards for one device, other devices will be able to connect to it even when
  57. they are behind a NAT network or firewall.
  58. .sp
  59. In the absence of port forwarding, relaying may work well enough to get
  60. devices connected and synced, but will perform poorly in comparison to a
  61. direct connection.
  62. .SH LOCAL FIREWALL
  63. .sp
  64. If your PC has a local firewall, you will need to open the following ports for
  65. incoming and outgoing traffic:
  66. .INDENT 0.0
  67. .IP \(bu 2
  68. Port \fB22000/TCP\fP (or the actual listening port if you have changed
  69. the \fISync Protocol Listen Address\fP setting.)
  70. .IP \(bu 2
  71. Port \fB21027/UDP\fP (for discovery broadcasts on IPv4 and multicasts on IPv6)
  72. .UNINDENT
  73. .SH REMOTE WEB GUI
  74. .sp
  75. To be able to access the web GUI from other computers, you need to change the
  76. \fIGUI Listen Address\fP setting from the default \fB127.0.0.1:8384\fP to
  77. \fB0.0.0.0:8384\fP\&. You also need to open the port in your local firewall if you
  78. have one.
  79. .SS Tunneling via SSH
  80. .sp
  81. If you have SSH access to the machine running Syncthing but would rather not
  82. open the web GUI port to the outside world, you can access it through a SSH
  83. tunnel instead. You can start a tunnel with a command like the following:
  84. .INDENT 0.0
  85. .INDENT 3.5
  86. .sp
  87. .nf
  88. .ft C
  89. ssh \-L 9999:localhost:8384 machine
  90. .ft P
  91. .fi
  92. .UNINDENT
  93. .UNINDENT
  94. .sp
  95. This will bind to your local port 9999 and forward all connections from there to
  96. port 8384 on the target machine. This still works even if Syncthing is bound to
  97. listen on localhost only.
  98. .SH VIA A PROXY
  99. .sp
  100. Syncthing can use a SOCKS5 proxy for outbound connections. Please see proxying\&.
  101. .SH AUTHOR
  102. The Syncthing Authors
  103. .SH COPYRIGHT
  104. 2015, The Syncthing Authors
  105. .\" Generated by docutils manpage writer.
  106. .