Spotify ad block list 80% working. With Whitelist. Plus allhosts

It is very important to Clean you cache and block clients ad sites if you hear ad's then repeat the cleaning.

Lists there are 3 in use.

  1. gsv8 19 domains
    https://ncloud.zaclys.com/

  2. allhosts Updated most errors removed.
    https://ncloud.zaclys.com/

  3. spotify2
    https://ncloud.zaclys.com/

Spotify ad blocker by Smokingwheels May 22 2022

Use Pi-hole v5.10 FTL v5.15 Web Interface v5.12

Clean The Cache of Spotify

Linux snap installed: ~/snap/spotify/common/.cache/spotify/Storage
Linux: ~/.cache/spotify/Storage/
OS X: /Users/USERNAME/Library/Caches/com.spotify.client/Storage/
Windows: C:\Users\USERNAME\AppData\Local\Spotify\Storage

Whitelist 6 sites

#login5.spotify.com
#audio4-fa.scdn.co
#audio-ak-spotify-com.akamaized.net
#support.spotify.com
#spclient.wg.spotify.com
#support.spotify.com

End whitelist

I have the list synced with a Nextcloud host so its easy to update.
I welcome any comments.

So we only need list #3 and the whitelist?

You could try #1 and #3 without #2
My piholes have crashed atm so no way to test.

I know this doesn't add to the thread but these posts are what kept me away from the project because I thought it only blocked ad.

I had used wireshark in the past but not actively watching all the connections while in use, didn't know how much junk on the net there is.

Spotify is a cool service, if you don't want ads, then it's $120 a year. Same with all services. And websites, we all absolutely agree ads are annoying and use network power. So if nobody is shown the ads, how do these websites pay costs? They just go away?

@low_rider
I am on limited income for over 20 years now so most of my computers cost $5.00 from the local rubbish dump I fix them up.
That $120 buys me at least 2 new HDD's or 3 lots of RAM for my $5.00 notebooks.
I have COPD and am struggling to keep warm in the winter.

PS: I don't block the Cancer counsel's ads on spotify.

1 Like

Help needed.

  1. Have all 3 lists loaded in your pihole.
  2. Play music and when an ad comes up Pause Music and click on the banner/link.
  3. Copy the URL that the ad loads up and let me know here.

Thanks in advance.

The bad news look like you need to run a hosts file as well.

Having trouble blocking some ads.

There is a slight problem, I blocked the domain of awsglobalaccelerator.com but Windows 11 still resolved it, even after flushing the DNS cache.
The pihole said the domain was blocked and I confirmed that with the ssh session user john in linux.
I then added the domain awsglobalaccelerator.com as a Wildcard and it was blocked on windows 11.

Is there a problem with my pihole?

Wildcard blocking not working and play an audio ad
See pic

Blacklist

Log

After an ad got thru

Blacklist

Log

I removed your comment as completely unrelated to this topic (or anything related to Pi-hole).

A bit of progress I have shared my collection of blocklists.
I still have ads on Windows.
Linux seems ok after adding the yacy lists.

https://ncloud.zaclys.com/

Password REDACTED BY DEVELOPER

Why do you have ads on windows? I have blocked ALL ms domains on 10, nothing (to my knowledge) leaves my router until I press enter on a website in firefox. I block all mozilla domains too, to the point I had to let some through to use their relay service. Duck Duck Go also has a very similar service as well to strip email trackers.

Duck duck go shows @duck email whereas mozilla shows a cryptic gibberish @mozmail, so I set up both together!

1 Like

Could you possibly share the love?

In the words of Allman Brothers: that's what it's all comin to

I have a partial list, but I'll update it soon and post it somewhere if you want it.

I brag that no connection go through, until I open a non-browser program (and block those too when I get to them) and nothing loads in firefox until I hit enter in the bar.

I block all of mozilla domains that try to load even with all the checkboxes off in settings. I block netflix totally which auto-boots on my device until I want to use it. I love this pi-hole system, it's good peace of mind knowing what is happening on my network.

An example is I opened up everyone's favorite "Adobe" that's what people call it. It's their PDF program that makes connections when opened, who knows what for. Never would have noticed without a clean log of just domain entries.

Addition:

I made a simple list, no files, just copy them into one and have it locally, I think it's the best way.

**MSFT**
__________

(\.|^)msft$

www.msftncsi.com

dns.msftncsi.com


**SOFT**
__________

graph.microsoft.com

officecdn.microsoft.com

msedge.b.tlu.dl.delivery.mp.microsoft.com

msedge.f.dl.delivery.mp.microsoft.com

msedge.api.cdp.microsoft.com

officeclient.microsoft.com

checkappexec.microsoft.com

settings-win.data.microsoft.com

cxcs.microsoft.net

crl.microsoft.com

share.microsoft.com

(\.|^)microsoft\.*$

umwatson.events.data.microsoft.com


**Edge browser**
__________

dmd.metaservices.microsoft.com

edge.microsoft.com

smartscreen-prod.microsoft.com

nav.smartscreen.microsoft.com

browser.events.data.microsoft.com

v20.events.data.microsoft.com

self.events.data.microsoft.com

purchase.mp.microsoft.com

xbox-guide-public.rec.mp.microsoft.com

continuum.dds.microsoft.com

www.microsoft.com

collections.mp.microsoft.com

go.microsoft.com

fs.microsoft.com

v10.events.data.microsoft.com

nav-edge.smartscreen.microsoft.com

ping-edge.smartscreen.microsoft.com


**Windows Update**
__________

kv601.prod.do.dsp.mp.microsoft.com

9.tlu.dl.delivery.mp.microsoft.com

geo.prod.do.dsp.mp.microsoft.com

dl.delivery.mp.microsoft.com

fs.microsoft.com

fe3cr.delivery.mp.microsoft.com

emupdate.avcdn.net	(Windows Defender Updates!)

ctldl.windowsupdate.com

**Windows**
__________

activity.windows.com

maps.windows.com

wns2-by3p.wns.windows.com

xbaccessories.blob.core.windows.net

ctldl.windowsupdate.com

edge.activity.windows.com

I've blocked all this, and I keep it blocked. I might update every few months, but I haven't in a few months, and it might just be a few more until some really big update comes along.

1 Like

This $ means "the end of the string", so this would only block a domain called msft or longer domains which end in .msft, and there aren't any. If the aim is to match any domain containing .msft then just create a regex entry consisting of msft and note that will also do the job of the two entries after it.

The * here means "0 or more of the preceeding token" which in this case is a period, and then it's followed by the $ end of the string. So this will match microsoft followed by 0 or more periods then the end. So it would match a .microsoft top level domain. If the aim is to block any domain containg microsoft then instead make a regex entry consisting of microsoft and note it will cover all other entries that contain the string microsoft.

1 Like

Yeah, I know absolutely nothing about regular expressions. Could you help me understand what the \ are for, what the | is for, and the ^ because it's another unknown language for me. None of it makes sense yet.

https://docs.pi-hole.net/regex/tutorial/

1 Like

It's a kind of language for specifying patterns to be matched in text. I'm no expert by any means and over time you see the same things crop up and come to know them. It's useful to learn the basics for using in Pi-hole. You have the regex which is the pattern that you're trying to match, and you have the string that you're testing it against – in the case of Pi-hole those are the domains that its seeing coming from your network.

Some characters mean what they say, others have special meanings. Such as ^ matches the start of the string that you're testing, and $ matches the end of the string that you're testing. A period . means any character. The backslash \ means treat the next character literally, so \. means an actual period, whereas the period by itself means any character. The pipe | means or, eg this or that, and it's usually inside brackets with the various options. The * means match zero or more of the preceeding thing.

Eg for this regex in your rules

(\.|^)microsoft\.*$

that is saying "Start by matching either a period (\.) or (|) the start of the domain (^) followed by the letters microsoft followed by zero or more periods (\.*) and then the end of the domain ($)"

You can see that's not quite right because domains don't end with lots of dots in a row. It does happen to match microsoft's own top level domain which is just microsoft.

If you wanted a regex to match a domain which contained the words startrek or starwars, you might use

^.*star(trek|wars).*$

That is saying "From the start of the domain (^) I'm looking for any character (.) any number of times including none at all (*) followed by star and then either trek or (|) wars followed by any character (.) any number of times including none at all (*) and then the end of the domain ($)"

You don't really need the last .*$ part because it's already matched, but I prefer to cover the whole domain where I can, from start ^ to end $ to be thorough. The first part covers something like a www before star or nothing at all before it.

You can play around with them here – https://regex101.com. Put in a few test domains underneath and then work out your pattern on the top line and it will show you how it's matching.

There is just one list to work with now.

https://smokingwheels.github.io/Pi-hole/multiedit

see https://discourse.pi-hole.net/t/blocklist-approx-1-9-million-domains-includes-my-allhosts-and-hagezi-multi-blocklist/59262

@low_rider Thanks.

Do windows updates still work?

Absolutely not! This blocks everything microsoft. when you would like to download updates, you may white list a few of the domains temporarily. They may be something like "delivery" or "update" or "distribution" etc, I don't know what each one does, but you only need a couple or so to download updates. The rest is coal-burning crap.