Running Pi-hole on an old MacBook (VirtualBox + Debian)


I wanted a simple network-wide ad blocker and had an old machine lying around.

This is how I set up Pi-hole on a 2010 MacBook (SSD + 9GB RAM) using VirtualBox and a minimal Debian install.

Notes for me as I’m gonna need it in the future.


Setup overview

  • host: macOS (MacBook Unibody 2010)
  • VM: VirtualBox
  • OS: Debian (no GUI)
  • DNS: Pi-hole
  • DHCP: handled by router

1. Create virtual machine

In VirtualBox:

  • Type: Linux
  • Version: Debian (64-bit)
  • RAM: 1–2 GB
  • Disk: 10–20 GB (VDI, dynamically allocated)

Attach the Debian ISO.


2. Install Debian (no GUI)

Boot the VM and choose:

  • Install (not graphical)
  • hostname: pihole
  • domain: optional

When selecting packages:

  • uncheck everything
  • leave only:
    • SSH server
    • standard system utilities

3. Set a static IP

Edit:

sudo nano /etc/network/interfaces

Example:

auto enp0s3
iface enp0s3 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 1.1.1.1 8.8.8.8

Restart networking:

sudo systemctl restart networking

4. Update system

sudo apt update && sudo apt upgrade -y

5. Install Pi-hole

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

During setup:

select interface (enp0s3)
confirm static IP
choose upstream DNS
enable web interface

Save the admin password.

6. Access Pi-hole

Open:

http://192.168.1.10/admin

WORKS!

7. Configure router

In router settings:

set DNS server to: 192.168.1.10 disable conflicting DNS/DHCP settings if needed

8. Install DNS on Pi-hole

  • By default, Pi-hole acts as a DNS server for your network once installed.
  • Ensure your router’s DNS points to your Pi-hole IP (e.g., 192.168.1.10) so all devices automatically use Pi-hole for DNS.

9. Configure DHCP settings

  • Log into the Pi-hole admin interface:
    http://192.168.1.10/admin
    Go to Settings → DHCP.

Optionally, enable Pi-hole’s DHCP server to manage IP addresses: Define the range of IPs Pi-hole can assign. Disable DHCP on your router if using Pi-hole for DHCP to avoid conflicts. A small, quiet machine now handles DNS for the whole network.