Skip to content

Instantly share code, notes, and snippets.

@gene1wood
Created August 22, 2014 18:35
Show Gist options
  • Save gene1wood/a35acd65ab932f6f665f to your computer and use it in GitHub Desktop.
Save gene1wood/a35acd65ab932f6f665f to your computer and use it in GitHub Desktop.
transmission-daemon sysconfig file to enable binding to an interface
# /etc/sysconfig/transmission-daemon
INTERFACE=ppp0 # Set this to the interface you want the daemon to bind to
if /sbin/ifconfig $INTERFACE >>/dev/null 2>&1; then
BIND_ADDR="`/sbin/ifconfig $INTERFACE | awk '$1 == \"inet\" {print $2}' | awk -F: '{print $2}'`"
else
BIND_ADDR="127.0.0.1"
fi
# These are your standard daemon arguments
DAEMON_ARGS="--blocklist --auth --allowed \"127.*.*.*\" --logfile /var/log/transmission/transmission.log"
# This binds the daemon to the IP address of the interface $INTERFACE
DAEMON_ARGS="$DAEMON_ARGS --bind-address-ipv4 $BIND_ADDR"
@dooniem
Copy link

dooniem commented Oct 23, 2014

Hi. I'm assuming this is quite useful together with selective routing and getting Transmission-daemon to use a VPN. But I'm not 100% up to speed in where to put this and wether or not my interface is ppp0 or tun11. Would you mind helping me out a little?
I know how to make the file executable and to navigate around the system, so I'm not in need of THAT much help :)

@pa-0
Copy link

pa-0 commented Aug 11, 2025

Should BIND_ADDR be replaced with my IP address?

@gene1wood
Copy link
Author

@pa-0 Yes, the BIND_ADDR is the IP address of the network interface that you want transmission to use. So if your eth0 has an IP of 1.2.3.4 and you set BIND_ADDR to 1.2.3.4 then transmission will use eth0.

@pa-0
Copy link

pa-0 commented Aug 12, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment