Wednesday, 4 February 2015

Firewalld Configuration for Bittorrent Sync on Fedora 21

Have you started to use Bittorrent Sync (or btsync) yet?  Its absolutely fabulous and a great alternative to Box, Drive or Dropbox (and others).  And its a great snub to those that thinks 'bittorrent' equates to piracy when its simply a protocol.

When you add a folder or key and do not see any expected peers (your other machines with btsync installed, that connect to share content) this is most likely firewalld blocking your necessary port, when using Fedora 21.

The default behaviour of Fedora 21 with firewalld is to run in public zone with limited services inbound.  This is good.

You could disable firewalld - but thats crazy talk!  A firewall should be mandatory for any roaming machine, and still a good idea for a desktop or server.  A better idea, learn how to configure it (of course).

Now, you can configure btsync to use a specific port, turn off UPNP and put a hole in your router to your device.  There is an easier way.  (and not always an option if you are on a public or work network)

Lets keep using UPNP for the router, open up tcp/udp port 3000 for LAN searching, as well as allowing relay to work for external hosts.

So we do all our work in the firewall-config app.  You can find this in your menus or simply run it.

For a preamble, my sync.conf has the following related parameters:

"listening_port" : 0
"use_upnp" : true

On my home zone, I created a new service called (take a wild guess) btsync with a tcp and udp port, both using 3000.



Remember to configure your changes in the Permanent configuration (the drop down at the top).

Then on the home zone (or whichever you have configured for your connection), simply select btsync as a service.



Nearly done.  In the Options menu, select Reload Firewalld.

Switch to the Runtime configuration to see if your changes took hold.

Now check your btsync web interface, you should see your peers appear.

No comments:

Post a Comment