Syncthing: Difference between revisions
add firewall configuration to example Tags: Mobile edit Mobile web edit |
Bring firewall sentences together, likewise the GUI |
||
Line 53: | Line 53: | ||
}; | }; | ||
}; | }; | ||
</syntaxHighlight> | </syntaxHighlight> | ||
=== Firewall === | |||
You will probably have to open a few ports in the firewall: | |||
You will | |||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> | ||
# Syncthing ports: 8384 for remote access to GUI | # Syncthing ports: 8384 for remote access to GUI | ||
Line 71: | Line 65: | ||
networking.firewall.allowedUDPPorts = [ 22000 21027 ]; | networking.firewall.allowedUDPPorts = [ 22000 21027 ]; | ||
</syntaxHighlight> | </syntaxHighlight> | ||
Syncthing uses port 22000 to facilitate discovery of nodes on the local area network. If this port is blocked by the firewall, nodes will have to go all the way to the announce servers, then use a bridge to tunnel through NAT. This is much slower than just sending data in a "node1 -> router -> node2" path. | |||
=== Web GUI === | |||
If running a headless server, you should also change guiAddress to a publicly visible one (or just 0.0.0.0:8384, for example). | |||
It is also a good idea to protect the web GUI with a username and password: | It is also a good idea to protect the web GUI with a username and password: |