Ad blocking with Raspberry Pi and Pi-hole

栏目: IT技术 · 发布时间: 6年前

内容简介:Do you have aUse it for

Sick of ads on the Web, YouTube and other services?

Do you have a Raspberry Pi (4, 3, or even a Zero like me) laying around collecting dust and you want to make us of it?

Use it for ad-blocking in your home network and to finally browse the web, watch videos etc. without annoying ads.

Ad blocking with Raspberry Pi and Pi-hole

One-liner install

Take out your Raspberry Pi from your forgotten drawer and connect to it via SSH .

Now run the following for a simple installation ofPi-hole:

curl -sSL https://install.pi-hole.net | bash

Follow the on-screen instructionsbased on your preferences (query logging, static IP etc.) and you're one-step away for a ad-free experience while browsing the Web.

NB: Keep track of the password to access the admin panel!

Ad blocking with Raspberry Pi and Pi-hole

Configure the Router or individual devices

If you don't want to fiddle around with your router configuration , you can configure each device indidually.

That's the easiest method I find. For more information see discourse.pi-hole.net .

On your devices, head over to the DNS settings , and set as the only DNS server address the Raspberry's IP:

On iOS

Ad blocking with Raspberry Pi and Pi-hole

On Mac OS

Ad blocking with Raspberry Pi and Pi-hole

Verify DNS resolution

To verify that the Raspberry Pi is used for DNS resolution, you can use a simple trick.

I used dig tointerrogate DNS name servers, like this:

dig +trace cri.dev

You'll see a similar output (check for your Raspberry's IP address):

~ dig +trace cri.dev

; <<>> DiG 9.10.6 <<>> +trace cri.dev
;; global options: +cmd
.           509447  IN  NS  a.root-servers.net.
.           509447  IN  NS  b.root-servers.net.
.           509447  IN  NS  c.root-servers.net.
.           509447  IN  NS  d.root-servers.net.
.           509447  IN  NS  e.root-servers.net.
.           509447  IN  NS  f.root-servers.net.
.           509447  IN  NS  g.root-servers.net.
.           509447  IN  NS  h.root-servers.net.
.           509447  IN  NS  i.root-servers.net.
.           509447  IN  NS  j.root-servers.net.
.           509447  IN  NS  k.root-servers.net.
.           509447  IN  NS  l.root-servers.net.
.           509447  IN  NS  m.root-servers.net.
.           509447  IN  RRSIG   NS 8 0 518400 20200516050000 20200503040000 48903 . NtC6ObYfTRgLakuNLhMl ...
;; Received 525 bytes from 192.168.1.127#53(192.168.1.127) in 60 ms

...

As you can see, the Raspberry Pi's IP address ( 192.168.1.127 on port 53 ) is first interrogated for the DNS resolution.

Admin Panel

Pi-hole's administration panel can be accessed at http://{PI_IP_ADDRESS}/admin and optionally configure it further.

Personally, I prefer to set the DNS resolver privacy level to Anonymous mode so that even in your own home-network your privacy is respected.

Ad blocking with Raspberry Pi and Pi-hole

Donate to pi-hole

Head over topi-hole.net/donate/and if you're feeling generous, support pi-hole for the greater good.

Ad blocking with Raspberry Pi and Pi-hole


以上所述就是小编给大家介绍的《Ad blocking with Raspberry Pi and Pi-hole》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

现代操作系统(第3版)

现代操作系统(第3版)

Andrew S. Tanenbaum / 陈向群、马洪兵 / 机械工业出版社 / 2009-7 / 75.00元

本书是操作系统领域的经典之作,与第2版相比,增加了关于Linux、Windows Vista和Symbian操作系统的详细介绍。书中集中讨论了操作系统的基本原理,包括进程、线程、存储管理、文件系统、输入/输出、死锁等,同时还包含了有关计算机安全、多媒体操作系统、掌上计算机操作系统、微内核、多核处理机上的虚拟机以及操作系统设计等方面的内容。此外,还在第2版的基础上对部分习题进行了增删,更有助于读者学......一起来看看 《现代操作系统(第3版)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具