Page 1 of 1

How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Sat Aug 19, 2017 3:05 pm
by b17gsr
My kids love to stream music and I want to limit their other usages. Been trying to figure out how to do this.

Is there a way to allow unlimited streaming from Spotify?

Re: How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Sun Aug 20, 2017 1:51 pm
by d3fz
b17gsr wrote: Is there a way to allow unlimited streaming from Spotify?
Shorter answer is no, at least not for now.

This could only be achieved using QoS Layer7 Protocol, which is currently broken. Don't use it, it will put your router into a bootloop, or even brick it.

But probably (very likely ?) in a near future.

Re: How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Sun Aug 20, 2017 2:03 pm
by Daeron
Assuming the info I found is correct, Spotify seems to use ports 4370-4379 for HTTPS and 4380-4389 for HTTP. I suspect if they are listening to it via browser this might not work though.

With that in mind you can add a class named Spotify in your Firewall/QoS (Download) page. You can give it as much bandwidth as you want.

Then you can Add Rules to funnel the traffic into that class, using the ports mentioned above either as Destination or Source ports.

Start Spotify and check if the traffic is indeed visible in the corresponding class. If not, try setting up your rules using Destination ports instead of Source ports and vice versa.

If the traffic is properly caught, you can set up your QoS (Upload) page in a similar fashion. The only exception is when you create your rules, you will have to swap Destination ports for Source ports or vice versa. It should be the opposite of what worked on your download page.

Let me know if that works so far or not.

Re: How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Sun Aug 20, 2017 2:29 pm
by d3fz
Hi Daeron,

i found the same info online, and as i was testing/monitoring Spotify port usage, you replied. Thank you for your insight, always nice to discuss with someone interested in QoS.

I'm using Spotify via client app instaled on Windows 10, and here's what i gathered from the connection list, after streaming for about 10 minutes (Premium account, if that's any relevant):

When i first started streaming,

Code: Select all

									
104.154.127.64:4070		283.375 kBytes		Slow
LenovoPC:63404		1.121 MBytes		Slow

This is actually where all the streaming is coming from:
201.159.159.43:80 		703.947 kBytes		Normal	
LenovoPC:63749		36.599 MBytes		Normal
I also put the QoS classes being used after bw usage.

Any thoughts ?

Thank you.

Re: How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Sun Aug 20, 2017 3:33 pm
by Daeron
If the actual data goes through port 80 that'll be a problem.

You could also try filtering the traffic by IPs. According to some site these might be the ranges for Spotify:
78.31.8.0/21
193.182.8.0/21
194.68.28.0/22

Worth a shot but I wouldn't get my hopes up.

Re: How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Sun Aug 20, 2017 7:16 pm
by b17gsr
I gave it a try. Seems like each song comes from a different IP address. In the last few minutes, the following appeared under current connections:
172.217.1.180:443
151.101.20.246:80
194.132.173.241:80

Totally different ranges than any Spotify IP addresses currently listed on the net. Hmmm...

Re: How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Sun Aug 20, 2017 8:17 pm
by d3fz
Same here. I think the IP range varies according to region. (CDN ?)

I've tried opening and closing the app multiple times, to see how it behaves.

These servers appeared during this time (in my case):

Code: Select all

These showed up a LOT, i would say that creating a qos rule using these ip/range, could probably work.
201.159.159.43:80
201.159.159.57:80

These showed only once or twice
186.215.111.10:80
194.132.173.241:80
2.16.188.82:80
Probably this is one approach you could try, although not reliable, still an option.

I'll keep monitoring the connection list to see whatelse come up.

Re: How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Mon Aug 21, 2017 3:56 am
by Lantis
Isn't Spotify p2p??
If it is, you'll never lock it down.

Re: How to allow unlimited Spotify streaming, but throttle everything else?

Posted: Mon Aug 21, 2017 2:21 pm
by d3fz
Lantis wrote:Isn't Spotify p2p??
If it is, you'll never lock it down.
Used to, but apparently not anymore.

So maybe still it's worth a shot ?

After streaming for about 6+ hours:

Code: Select all

2.16.188.82:80		5.510 MBytes
LenovoPC:61297		266.129 MBytes