Koozali.org: home of the SME Server

Bloquer la publicité comme avec Pi-Hole...

Offline STRyk

  • ****
  • 190
  • +0/-0
Bloquer la publicité comme avec Pi-Hole...
« on: June 09, 2020, 05:07:45 AM »
Bonjour !
Certains sites deviennent vraiment illisibles, j'aimerai filter la publicité.
Mon server SME ne fais pas passerelle, je voulais savoir ce que vous utilisez actuellement.
Pi-Hole à l'air vraiment efficace mais j'ai cherché à l'instalkler sur SME 9.2 et apparement c'est une galère...

Si vous avez un retour d'expérience sur le blocage des publicités, ce serait super.

Merci par avance !
;)

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Bloquer la publicité comme avec Pi-Hole...
« Reply #1 on: June 09, 2020, 10:11:37 AM »
https://wiki.contribs.org/Category:Contrib:webfiltering

This will rely on you setting your browsers to use it as their web proxy.

Alternatively run your pi hole on a Pi and redirect DNS queries from SME to the Pi (assuming you use SME for your DNS)

That will mean you need to keep DNS over HTTPS disabled in your browsers.

(In some countries this is being rolled out without user interaction)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline krisden

  • *
  • 43
  • +0/-0
Re: Bloquer la publicité comme avec Pi-Hole...
« Reply #2 on: June 09, 2020, 07:32:15 PM »
Bonjour !
Certains sites deviennent vraiment illisibles, j'aimerai filter la publicité.
Si ton navigateur est Firefox, le module complémentaire "ublock origin" est ton meilleur ami ;-)
Je ne connais pas Pi-Hole donc pas de conseil à donner en ce sens.

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Bloquer la publicité comme avec Pi-Hole...
« Reply #3 on: June 09, 2020, 11:33:48 PM »
And uMatrix. But is is savage :-)

But PiHole is very good.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: Bloquer la publicité comme avec Pi-Hole...
« Reply #4 on: June 10, 2020, 12:41:26 PM »
I run pi-hole on a raspberry pi.

* My SME server points to pihole as the 'corporate dns' server

* DHCP
I use a custom template fragment and a config variable to push my network clients to use the pi-hole for dns
(https://github.com/mmccarn/smeserver/blob/master/templates-custom/etc/dhcpd.conf/25DomainNameServers):
Code: [Select]
# create a custom template for dhcpd.conf for 25DomainNameServers
mkdir -p /etc/e-smith/templates-custom/etc/dhcpd.conf
cd /etc/e-smith/templates-custom/etc/dhcpd.conf
wget https://raw.githubusercontent.com/mmccarn/smeserver/master/templates-custom/etc/dhcpd.conf/25DomainNameServers

# replace a.b.c.d with the IP address of pihole
config setprop DomainNameServers a.b.c.d

# activate the change
signal-event ip-change

* DNSBL Spam Blocking
DNSBL for spam fighting does not work if the resulting DNS queries are relayed through a popular upstream DNS server (like google or opendns).  To work around this, I created a script that runs on the pi-hole server to create custom entries for the dnsbl services so that these queries are sent directly to the associated service.

Contribs.org discussion about the problem:
https://forums.contribs.org/index.php/topic,54051.msg282216.html#msg282216

Github code for a script to put on your pihole server (you need to edit the script to include the dnsbl services you have configured on your SME server):
https://github.com/mmccarn/pihole/blob/master/bin/pihole-dnsbl.sh


* Streaming Services
Netflix and Hulu seem to block access on devices using pihole for DNS.  I have my SmartTV and AppleTV devices pointing to Google DNS directly.