How to setup Pi-hole on Openvpn connection only

Hello everyone.
I am posting this to tell you how to set up pi-hole for openvpn connection only with out missing up your network interfaces. And one thing I forgot to mention is what is pi-hole :grin:?pi hole is a system or a punch of scripts that reacts like a firewall or the dns server to block ad-blockers across your network.

The first thing you wanna do is go to any search engine and then search up pi-hole once you get to the website which is gonna be the first one on the search engine for sure go to the installation section of the website and then their website will redirect you to github in there you will find a one line command that will download the script using curl and pipe it to bash after the script runs it will start taking inputs from the user to customize the pi-hole system once you get to the question of choose an interface so that pi hole can block ads on that connection make sure to choose the tun0 which is in my case the openvpn server network interface and then set the machine or network ip as 10.8.0.1/24 which is both the machine ip and the gateway address of the network and that is it know you have an ad-blocker running with your openvpn server.

1 Like

@miguel
Just as I promised

Here are some public pi-hole servers: https://public-pihole.com

You can just use one of those as your DNS, and it will work just fine in blocking things.

My point is trust and not simplicity

But anyways that would be good once you are at school

Where are your DNS servers getting their results? Do you trust that traffic?

There’s not much difference in trust by having your DNS server query a public DNS server, or you querying that same public DNS server directly, is there?

Just adding another level of complexity?

Okay then I will call this for learning :grin:

So the important thing to know is that pi-hole is a DNS server. Nothing else :slight_smile:

Is this running on a Raspberry PI? Would it be good for home use?

It’s actually running on a VPS in france

It’s perfect for home use. You can just set your DHCP server to give it out as your primary DNS, and it takes care of the rest. See the link above for how I use it in my house. It blocks ads, web-based malware, etc.

I initially ran it on a raspberry PI, but eventually moved it to a ubuntu server virtual machine.

It should run on any unix platform, no problem. Very easy to set up!

Here’s the link: https://pi-hole.net