Skip to content

Add sample for configuring nftables #856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions users/firewall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ it with::

Similarly there is also a ``syncthing-gui`` service.

nftables
~~~~~~~~
For hosts using a somewhat standard setup of ``nftables``, placing the
following content in ``/etc/nftables.d/syncthing.nft`` should allow syncthing
to be discovered via local discovery and receive direct connections.

table inet filter {
chain input {
udp dport 21027 accept comment "Allow syncthing discovery"
udp dport 22000 accept comment "Allow syncthing peers"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's recommended to open both 22000/UDP and 22000/TCP in the firewall, for the default listeners.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
udp dport 22000 accept comment "Allow syncthing peers"
udp dport 22000 accept comment "Allow syncthing peers (QUIC)"
tcp dport 22000 accept comment "Allow syncthing peers (TCP)"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this

}
}

Remote Web GUI
--------------
Expand Down