Skip to content

Instantly share code, notes, and snippets.

@lotas
Forked from gene1wood/transmission-daemon
Created March 10, 2014 09:38
Show Gist options
  • Save lotas/9462064 to your computer and use it in GitHub Desktop.
Save lotas/9462064 to your computer and use it in GitHub Desktop.
# Username/password example
# DAEMON_ARGS="-b -t -a \"*.*.*.*\" -e /var/log/transmission/transmission.log"
# No username/password, but limited to 192.168.1.*
# DAEMON_ARGS="-b -T -a \"192.168.1.*\" -e /var/log/transmission/transmission.log"
INTERFACE=ppp0
if 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
DAEMON_ARGS="--bind-address-ipv4 $BIND_ADDR"
@lotas
Copy link
Author

lotas commented Mar 10, 2014

iptables -t nat -A PREROUTING -p tcp --dport 51413 -j DNAT --to-destination {BIND_ADDRESS}:51413
iptables -t nat -A PREROUTING -p upd --dport 51413 -j DNAT --to-destination {BIND_ADDRESS}:51413

-i tap+

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