spotifyd icon indicating copy to clipboard operation
spotifyd copied to clipboard

Fixed listen port

Open Rudd-O opened this issue 6 years ago • 3 comments

Currently, spotifyd listens on a random port when it starts. This is a problem because layer 4 firewalls cannot cope with random ports, so one must either open all ports to clients (iPhones and other untrusted devices) or simply not use spotifyd.

The program needs another command line option (not at all present in the --help output of the latest Linux release as of today) to force a specific port on spotifyd.

Thanks.

Rudd-O avatar Jan 05 '20 01:01 Rudd-O

@Rudd-O , have you tested the command line option --zeroconf-port? When using it, spotifyd will listen on specified TCP port. Like in:

spotifyd --no-daemon --d mydevice --zeroconf-port 4444

I've found that port 5353/UDP is also used by spotifyd, and seems needed to be opened for discover on local network:

# lsof -i -P -n | grep spotifyd
spotifyd  27308         spotify   18u  IPv4 1699695      0t0  TCP *:4444 (LISTEN)
spotifyd  27308         spotify   19u  IPv4 1699696      0t0  UDP *:5353 

Try on command line, the zeroconf_port entry on config file seems buggy as discussed on #477

lulis avatar Jan 21 '20 19:01 lulis

Fixed in #480.

mainrs avatar Jan 23 '20 12:01 mainrs

I've found that port 5353/UDP is also used by spotifyd, and seems needed to be opened for discover on local network:

# lsof -i -P -n | grep spotifyd
spotifyd  27308         spotify   18u  IPv4 1699695      0t0  TCP *:4444 (LISTEN)
spotifyd  27308         spotify   19u  IPv4 1699696      0t0  UDP *:5353 

@SirWindfield , can be useful provide this ports information on README.md for firewalling purposes, what do you think?

lulis avatar Jan 23 '20 13:01 lulis