transmission-daemon: does not respect --bind-address-ipv4

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
pawsen
Posts: 2
Joined: Sun Jul 02, 2017 12:27 pm

transmission-daemon: does not respect --bind-address-ipv4

Post by pawsen »

Dear all,

I'm having multiple IPs and interfaces on my server. So far transmission-daemon has just been listening on 0.0.0.0, but now I need it to listen to only a specific IP.

Code: Select all

ip addr show eth0 | grep inet | awk '{print $2}'
xxx.xxx.xxx.166/26
xxx.xxx.xxx.131/26
xxx.xxx.xxx.137/26
2001:xxx:0:xxx:xxx:xx:xx:52/126
fe80::21b:21ff:fed7:7fc7/64
So I would like transmission only to listen on xxx.xxx.xxx.166/26. But if I start it with

Code: Select all

transmission-daemon --bind-address-ipv4=xxx.xxx.xxx.166/26
, it is not respected.

Code: Select all

netstat -tulpn | grep 9091
tcp        0      0 0.0.0.0:9091            0.0.0.0:*               LISTEN      14711/transmission-
If I start another service on .137:9091 and start transmission with

Code: Select all

transmission-daemon --bind-address-ipv4=xxx.xxx.xxx.166/26
, it just start listen to another random port:

Code: Select all

netstat -tulpn | grep trans
tcp        0      0 0.0.0.0:51413           0.0.0.0:*               LISTEN      15663/transmission-
It does not matter whether I specify the bind address on the CLI or in

Code: Select all

 /etc/transmission-daemon/settings.json
    "bind-address-ipv4": "xxx.xxx.xxx.166/26",
 
.

Transmission changes it back to 0.0.0.0 when I stop the daemon again. I change settings.json when transmission is not running.

--
Just to clarify:
I use debian strech and systemd for starting transmission-daemon. Then /etc/transmission-daemon/settings.json is the settings read.
If I start it from CLI(just for testing), then the config is in $USER/.config/transmission-daemon/settings.json.


Anyone who can help me to get transmission to only listen to a single IP?

Best regards,
Paw
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: transmission-daemon: does not respect --bind-address-ipv4

Post by mike.dld »

You seem to be passing a subnet, not an IP address. Try with plain "xxx.xxx.xxx.166" (drop "/26").
pawsen
Posts: 2
Joined: Sun Jul 02, 2017 12:27 pm

Re: transmission-daemon: does not respect --bind-address-ipv4

Post by pawsen »

mike.dld wrote:You seem to be passing a subnet, not an IP address. Try with plain "xxx.xxx.xxx.166" (drop "/26").
Yes, you're right.
I feel a bit ashamed now... Thanks for the help!
Post Reply