pfSense+PiHole - Easy right?

I have just rebuilt my Proxmox machine and got pfSense up and running again so that I can use everything as I would normally. I decided a while ago that I needed to get on the PiHole bandwagon and block ads network-wide rather than just on my own devices, per browser, etc.

Network setup:
ISP modem > pfSense (as router+DHCP server) > rest of network.
I have pfSense set as the .1 in my subnet, PiHole as .2.

Supposedly, all I need to do is set the DNS address to that of my PiHole server in the DHCP settings on pfSense. I did that and got no internet + DNS errors.

Is it possible to have pfSense acting as a full router but still pass internet to PiHole which handles DNS requests?

To add to the confusion, don’t forget both pfSense and PiHole are run as VMs on Proxmox.

Help would be appreciated. Thanks guys

What is the PiHole forwarding to, though? I bet it’s the .1 giving you a loop?

We have our own DNS and run OPNsense, so we have our DHCP put our local DNS address in the DHCP leases, that way they look locally first, then the local DNS (PiHole in your case) can forward to the .1 which can forward to the ISP or wherever. Our OPNsense router doesn’t need to look up things on our local DNS, so it just forwards upstream only.

If you’re not dead set on PiHole, consider the pfBlockerNG add on for pfSense, which has similar features and is quite easy to configure (e.g. youtube guide)

2 Likes

I don’t know exactly what you mean by all of that as I’m still learning a lot of networking stuff.

Are you saying that I should have normal DNS settings on the WAN side of pfSense, have it also provide DNS on .1, then have PiHole also provide DNS to everything but on .2, and point it at .1? I’m not sure if I follow what you’re suggesting…

EDIT: And what exactly is the difference between the gateway and DNS server?

Not dead set on PiHole but tried to use pfBlocker years ago and found it complicated. Haha! Maybe I’m just not cut out for networking…

1 Like

No, in your DHCP config, you should put your PiHole as the DNS server since that’s what you want it to do. That will make your DHCP clients (PCs, tablets, etc) use the PiHole for address lookups.

In your PiHole’s config, where you set up a forward DNS, that’s where you put the pfSense router’s address.

pfSense shouldn’t have the PiHole’s address set in any of its DNS settings. Just use the DNS provided by your ISP or some other one (CloudFlare, etc) that you want to use.

A gateway is where packets from your network that are going to another network have to pass through. It’s literally a gateway.

A DNS server is a service that translates addresses like “forum.level1techs.com” into an IP address. PiHole is used to create a DNS service that translates addresses like “spy.doubleclick.net” etc into fake IP addresses, so your browser won’t even be able to fetch them.

Here’s some more info on PiHole: https://discourse.pi-hole.net/t/how-does-pi-hole-work/3141

1 Like

Perhaps I should post about how to configure pi-hole and opnsense redirects in my blog.

If there’s a demand for how it’s done.

Basically what you want is what buffy said. Set the DNS in dhcp. If you are using this it’s best to configure static addresses via a static lease

You have two options for redirects. You can either redirect ALL dns traffic to the pi and have the pi exit via DoT or DoH or you redirect all with exception to the pi allowed 53 out. These are simple lan and wan rules to setup on both opnsense and pfsense but make sure you have the pi-hole working and configured as you want it first

2 Likes

I would be very interested in learning how to setup pi-hole and opensense. Pfblockerng looks way more advanced than my simple needs. I need a way to block adds and keep adds from creating their own browser tab.

1 Like

That’s why novasty and I use pi-hole. Alright I’ll get on it. Soon ™. Still working

1 Like

kitteh-soon-rudy

2 Likes

Thanks for all the useful knowledge, guys. Looks like I did have things in my head as they were supposed to be and I’m now just overthinking. Not sure what’s up with my network now though as it’s very slow to respond - sometimes showing as no internet. Like there’s either a loop or DNS issue. The Pihole VM is offline at the moment so I don’t understand why it’s broken. Haha! I shall have a play around and see where it gets me.

2 Likes

you are correct

This should help you a bit

Post 153 - Pi-Hole DNS Setup with block rules in OPNSense

Let me know if you have questions there or here :slight_smile:

1 Like

Oh no! I had the opposite experience LOL. Well, they’ve updated the UI somewhat recently if you feel like giving it another shot. Ideally, though, your pihole will be up and running soon :slight_smile:

@PhaseLockedLoop Thanks for the guide you posted on how to set up a Pi-Hole. I did get it set up yesterday, and it seems to work, but I was a little disappointed the Pi-Hole didn’t block any Youtube adds or adds on my IPTV service. The reason might be the adds are merge with the programming, or I need to find a different Pi-Hole list to add to my Pi-Hole. I know the Pi-Hole is working (hence my statement seems to work) because this morning, when I tried to use my IPTV service. The IPTV service wouldn’t work unless the Pi-Hole were running. It is blocking some ads on certain websites I visit, so it should be working.

Google and CDNs are getting smarter. YT serves ads over its host domain now.

screenshot the status page?

I might be able to provide all my block lists. It does a great job at 1.9 Million

1 Like

Hi @PhaseLockedLoop sorry, I didn’t get back to you until now; I have been busy at work. I have included the screenshot of my PI-Hole dashboard below.


I am so impressed with the Pi-Hole concept I am thinking of purchasing a Raspberry Pi Official Pi 4 Essentials Kit - 8GB to retire my Pi_hole VM and have my Pi-Hole running 24 /7 instead of having it only available when my desktop is running. If you could share your block list or point me in the right direction, I would be so grateful. Thank again for your post.