From e408f1061ab98348415bb7168670e2ceb8ca204b Mon Sep 17 00:00:00 2001 From: Stefan Kuntz Date: Thu, 3 Nov 2016 15:46:25 +0000 Subject: [PATCH] etc: Added ufw firewall application preset GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3703 --- build.go | 1 + etc/firewall-ufw/README.md | 22 ++++++++++++++++++++++ etc/firewall-ufw/syncthing | 4 ++++ 3 files changed, 27 insertions(+) create mode 100644 etc/firewall-ufw/README.md create mode 100644 etc/firewall-ufw/syncthing diff --git a/build.go b/build.go index e790d71a5..253e4f760 100644 --- a/build.go +++ b/build.go @@ -95,6 +95,7 @@ var targets = map[string]target{ {src: "etc/linux-systemd/system/syncthing@.service", dst: "deb/lib/systemd/system/syncthing@.service", perm: 0644}, {src: "etc/linux-systemd/system/syncthing-resume.service", dst: "deb/lib/systemd/system/syncthing-resume.service", perm: 0644}, {src: "etc/linux-systemd/user/syncthing.service", dst: "deb/usr/lib/systemd/user/syncthing.service", perm: 0644}, + {src: "etc/firewall-ufw/syncthing", dst: "deb/etc/ufw/applications.d/syncthing", perm: 0644}, }, }, "stdiscosrv": { diff --git a/etc/firewall-ufw/README.md b/etc/firewall-ufw/README.md new file mode 100644 index 000000000..875eb1a7c --- /dev/null +++ b/etc/firewall-ufw/README.md @@ -0,0 +1,22 @@ +Uncomplicated FireWall application preset +=================== +Installation +----------- +**Please note:** When you installed syncthing using the official deb package, you can skip the copying. + +Copy the file `syncthing` to your ufw applications directory usually located at `/etc/ufw/applications.d/`. (root permissions required). + +In a terminal run +``` +sudo ufw app update syncthing +``` +to load the preset. +To allow the syncthing ports, run +``` +sudo ufw allow syncthing +``` +You can then verify the opened ports +``` +sudo ufw status verbose +``` + diff --git a/etc/firewall-ufw/syncthing b/etc/firewall-ufw/syncthing new file mode 100644 index 000000000..1aeada11f --- /dev/null +++ b/etc/firewall-ufw/syncthing @@ -0,0 +1,4 @@ +[syncthing] +title=Syncthing +description=Syncthing file synchronisation +ports=22000/tcp|21027/udp