syncthing-networking.7 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-NETWORKING" "7" "June 14, 2015" "v0.11" "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. .SH LOCAL FIREWALL
  59. .sp
  60. If your PC has a local firewall, you will need to open the following ports for
  61. incoming traffic:
  62. .INDENT 0.0
  63. .IP \(bu 2
  64. Port \fB22000/TCP\fP (or the actual listening port if you have changed
  65. the \fISync Protocol Listen Address\fP setting.)
  66. .IP \(bu 2
  67. Port \fB21025/UDP\fP (for discovery broadcasts)
  68. .UNINDENT
  69. .SH REMOTE WEB GUI
  70. .sp
  71. To be able to access the web GUI from other computers, you need to change the
  72. \fIGUI Listen Address\fP setting from the default \fB127.0.0.1:8384\fP to
  73. \fB0.0.0.0:8384\fP\&. You also need to open the port in your local firewall if you
  74. have one.
  75. .SS Tunneling via SSH
  76. .sp
  77. If you have SSH access to the machine running Syncthing but would rather not
  78. open the web GUI port to the outside world, you can access it through a SSH
  79. tunnel instead. You can start a tunnel with a command like the following:
  80. .INDENT 0.0
  81. .INDENT 3.5
  82. .sp
  83. .nf
  84. .ft C
  85. ssh \-L 9999:localhost:8384 machine
  86. .ft P
  87. .fi
  88. .UNINDENT
  89. .UNINDENT
  90. .sp
  91. This will bind to your local port 9999 and forward all connections from there to
  92. port 8384 on the target machine. This still works even if Syncthing is bound to
  93. listen on localhost only.
  94. .sp
  95. You can forward multiple ports corresponding to many machines this way, but
  96. because Syncthing uses session cookies for the entire domain (i.e. your local
  97. machine), you will need to connect to each control panel in a separate browser
  98. instance or explicitly issue a browser reload when switching between them.
  99. .SH AUTHOR
  100. The Syncthing Authors
  101. .SH COPYRIGHT
  102. 2015, The Syncthing Authors
  103. .\" Generated by docutils manpage writer.
  104. .