Is it possible to limit BitTorrent Sync connections to a a specific network using the client software? Right now the closest I can come up with would be IP limitations imposed on each client using a firewall. This seems like it would work fine, except for if any client somehow ventures outside those firewall restrictions.


If you are using Linux, iptables has a match called "owner" where you can apply certain rules based off the UID or GID of the process sending the data.

For instance:

  • Put the IP's or CIDR network addresses in a file (one entry per line)
  • Create a new user called btsync
  • Run the following:

    sudo iptables -N btsync_filter
    sudo iptables -I OUTPUT -m owner --uid-owner btsync -j btsync_filter
    while read ip; do 
        [[ -n "$ip" ]] && sudo iptables -A btsync_filter -d $ip -j DROP
    sudo -u btsync btsync

This will run btsync as the user btsync and all packets from that process that are going to a restricted IP will be dropped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.