Install PiHole on Opnsense

Started by Guybrush, January 14, 2019, 11:27:05 AM

Previous topic - Next topic
February 14, 2024, 11:15:06 AM #15 Last Edit: February 14, 2024, 11:22:13 AM by lilsense
Quote from: Patrick M. Hausen on February 13, 2024, 10:12:48 PM
Pihole is a classic example of Linux centric development. No way (currently) it's going to run on FreeBSD.

Not my or OPNsense's fault.
Patrick, this is an incorrect statement. I have Pihole running on TrueNAS Core Virtual Machine using bhyve. As an example there is a thread post here to install OpenWRT on OPNsense using bhyve. So, there is no technical reason why this cannot happen.

HOWTO: Setup OpenWRT Virtual Machine on OPNsense and use it to manage a WiFi AP

Might be the case lilsense BUT if I read it correctly,  the statement in its intention -to which I wholeheartedly agree- is that the application has no native freebsd development. In other words there is no port or package that can be installed natively. The only way is using virtualisation to run it; bhyve is just another flavour of virtualisation.

February 14, 2024, 11:32:55 AM #17 Last Edit: February 14, 2024, 11:38:16 AM by lilsense
No doubt, and also I am not sure of APU2 has the oomph to make it over the hill... BUT that does not mean that there are no other ways on the same FreeBSD machine to run say Linux/Windows or even Mac... :D

Here's the link:
https://docs.pi-hole.net/main/prerequisites/#supported-operating-systems

I am running mine on RockyLinux.

https://rockylinux.org/

Semantics aside, where it won't run natively, we're agreeing :)
Indeed putting any virtualisation type 2 on an APU is beyong pushing it.

Quote from: cookiemonster on February 14, 2024, 10:56:01 AMI wanted Pi-hole but didn't want to buy a raspberry just for that, so I used the pi-hole provided Virtual Machine amd-64 image and ran it as a VM on an ESXi host. All fine.

ESXi is no longer free 😭

Quote from: lilsense on February 14, 2024, 11:15:06 AM
Quote from: Patrick M. Hausen on February 13, 2024, 10:12:48 PM
Pihole is a classic example of Linux centric development. No way (currently) it's going to run on FreeBSD.

Not my or OPNsense's fault.
Patrick, this is an incorrect statement. I have Pihole running on TrueNAS Core Virtual Machine using bhyve.

That's still not running PiHole on FreeBSD. That's still installing PiHole on Linux. But yeah, as long as your opnsense box has enough resources, running Linux on bhyve is doable. Still can't use the PiHole installer scripts on FreeBSD directly and modifying PiHole for BSD would be a huge effort. Running PiHole in a jail would be much more attractive than using bhyve.

What about the Linuxulator? I haven't used that since the Linux 2.6.26 days; I had thought it was abandoned, but the wiki says Linux 4.4 compatibility. Can that be used for Docker? Or is it more like WINE and too much of the Linux kernel API is still unimplemented?

To answer you question OP, unbound on OPNsense can do almost anything that pihole does, without the nice GUI.
Just select the usual blocklists under, well blocklist ;)
Mostly the same blocklists you would load under pihole.

Before I got myself an OPNSense router, I ran piHole on an RPi. When I switched to OPNSense, I went for AdGuardHome running on the same APU as OPNSense and I am very happy with the result, performance, blocking and GUI. I recommend trying it out.
OPNsense 24.7.7-amd64 on APU2E4 using ZFS