Setting PiHole to work on Virtualbox with dedicated NIC

  • Hello Forum!


    I've been playing for a while with the idea of setting a PiHole server at home. The most straightforward way to do it would be to set up a Rasperry Pi and finito! However, being the curious non-straightforward guy that I am, I thought about setting PiHole in my server as a VM.


    As background information, the motherboard on my OMV server is an Intel DQ77KB which has 2 (Intel) NICs. My original idea was to let OMV work exclusively with one NIC and set the second one exclusively for PiHole. The VM will even have its own physical HDD (a small 2 Gb SSD, more than enough for a minimum Debian install plus PiHole). However, when I created a VM in virtualBox and tried to assign the second NIC to the VM, it was not available. I set the network in Bridged Mode, but the only NIC shown is the one used by OMV.


    Searching thru the Forum I found some threads about multiple-NIC OMV installations, and most of them point to the fact that OMV shows only the NIC used by it. The network interfaces menu on the GUI shows only one NIC (eth2), and so does ifconfig -a. Both NICs are connected to my router, but only one is shown in the list of attached devices.


    Therefore, the thing is like this:


    1. Is the proposed idea of the VM with PiHole the best solution? If not, what do you recommend? I know that I can use the Raspi, but I don't want another device hanging around my router. I thought about taking advantage of the dual NIC on the mainboard.


    2. How can I assign the second NIC exclusivelly to the PiHole VM?

    Custom mini-ITX build
    Coolcube Mini, Intel Desktop Board DQ77KB, Intel Core i3-3220, 8 GB DDR3 Ram, 30 GB Sandisk SSDnow 200 (OS), 1 TB Samsung M8 HN-M101MBB

    Dell Optiplex 960 sff (deprecated) - link


    Dell Optiplex FX160 (repurposed) - link


    "If you can't find it in Google, it simply doesn't exist!" - The Internetz


  • I am not familiar with docker to be honest. Will look onto that. Thanks!


    EDIT:


    After looking at Docker, it certainly is a far better approach to use PiHole since I do not need to make a full OS install (the case for the VM option). Now, if I install PiHole in Docker, will the docker have its own IP Address different from OMW? The reason being that I have to point the router DNS server to the IP of PiHole in order for it to work.

    Custom mini-ITX build
    Coolcube Mini, Intel Desktop Board DQ77KB, Intel Core i3-3220, 8 GB DDR3 Ram, 30 GB Sandisk SSDnow 200 (OS), 1 TB Samsung M8 HN-M101MBB

    Dell Optiplex 960 sff (deprecated) - link


    Dell Optiplex FX160 (repurposed) - link


    "If you can't find it in Google, it simply doesn't exist!" - The Internetz


    Edited once, last by Eryan ().

  • I struggled to get pihole working with docker and ended up getting a rpi zero w.
    Would love to see a step by step guide though.

    I am having also issues with Docker and was also considering just using a Raspi. Wanted to test it first with a DietPi VM or something along the lines, but for simplicity's sake chances are that I'll go the Raspi way.


    Sent from my Robin using Tapatalk

    Custom mini-ITX build
    Coolcube Mini, Intel Desktop Board DQ77KB, Intel Core i3-3220, 8 GB DDR3 Ram, 30 GB Sandisk SSDnow 200 (OS), 1 TB Samsung M8 HN-M101MBB

    Dell Optiplex 960 sff (deprecated) - link


    Dell Optiplex FX160 (repurposed) - link


    "If you can't find it in Google, it simply doesn't exist!" - The Internetz


  • I'm very happy (works fine) with my pihole install on OMV: [HOWTO] Install Pi-Hole


    With Drinks2go help you can configure to use other IP/NIC dedicate to pihole.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!