Pi-hole Local DNS CentOS 8 Server – VMware Home Lab

I wanted to setup a lightweight (1 vCPU/ 256MB RAM) local DNS server (*.my.lab) for my VMware Home Lab.
Pi-hole offers a web based GUI to add the local DNS records and visual of the record lookups.

During the installation, I changed my upstream DNS to a bogus internal IP address to prevent an app from “phoning home”

Lightweight memory:
free -m shows 139 MB used. vCSA shows 51 MB used. Pi-hole app page shows memory usage 65 %

 

  • New CentOS 8 (64 bit) VM with Internet access and a static IP address on the same subnet as the VMware suite of apps.
  • 2 vCPU / 2 GB RAM / 20 GB think disk / Boot Options Firmware EFI.  (The CPU/MEM will be lowered once the pi-hole app is installed.)
  • CentOS-8.1.1911-x86_64-dvd1.iso Connected on Power On.
  • Software Selection – Minimal
  • Set SELinux prints warnings instead of enforcing.
    vi /etc/selinux/config
    SELINUX=permissive
  • Allow DNS and HTTP through the firewall
    firewall-cmd –permanent –zone=public –add-service dns –add-service http
  • Reboot for the SELinux and firewall changes to take effect.
  • Install Pi-Hole
    curl -sSL https://install.pi-hole.net | bash
  • I changed my upstream DNS to a bogus IP address to stop apps from “phoning home”
  • Remove the password to the http site http://pihole_fqnd/admin/ (optional)
    pihole -a -p
  • side note – easy to read diagnostics if there is a problem.
    pihole -d
  1. Shutdown the VM
  2. Set the vCPU to 1 and RAM to 256MB
  3. Set CDROM to Client Device
  4. Power on
  • I set the theme to dark – /admin/settings.php?tab=api
  • Add local DNS records via the GUI or file
    /etc/pihole/custom.list

Once the vmware apps are pointed to the pihole you can see how often queries are made.
You can see the client vCenter is querying to know the vsan host 1 FQDN multiple time per minute. AAAA is IPv6 /admin/queries.php
In a 24 hour day the 2 vcenters are popular with 29-31k! /admin/db_lists.php

Why

I wanted to setup a lightweight (1 vCPU/ 256MB RAM) local DNS server (*.my.lab) for my VMware Home Lab.
Pi-hole offers a web based GUI to add the local DNS records and visual of the record lookups.

During the installation, I changed my upstream DNS to a bogus internal IP address to prevent an app from “phoning home”

Lightweight memory:
free -m shows 139 MB used. vCSA shows 51 MB used. Pi-hole app page shows memory usage 65 %

 

CentOS 8 VM
  • New CentOS 8 (64 bit) VM with Internet access and a static IP address on the same subnet as the VMware suite of apps.
  • 2 vCPU / 2 GB RAM / 20 GB think disk / Boot Options Firmware EFI.  (The CPU/MEM will be lowered once the pi-hole app is installed.)
  • CentOS-8.1.1911-x86_64-dvd1.iso Connected on Power On.
  • Software Selection – Minimal
OS Updates
selinux firewall
  • Set SELinux prints warnings instead of enforcing.
    vi /etc/selinux/config
    SELINUX=permissive
  • Allow DNS and HTTP through the firewall
    firewall-cmd –permanent –zone=public –add-service dns –add-service http
  • Reboot for the SELinux and firewall changes to take effect.
Pi-Hole
  • Install Pi-Hole
    curl -sSL https://install.pi-hole.net | bash
  • I changed my upstream DNS to a bogus IP address to stop apps from “phoning home”
  • Remove the password to the http site http://pihole_fqnd/admin/ (optional)
    pihole -a -p
  • side note – easy to read diagnostics if there is a problem.
    pihole -d
  1. Shutdown the VM
  2. Set the vCPU to 1 and RAM to 256MB
  3. Set CDROM to Client Device
  4. Power on
Add Records
  • I set the theme to dark – /admin/settings.php?tab=api
  • Add local DNS records via the GUI or file
    /etc/pihole/custom.list
Results

Once the vmware apps are pointed to the pihole you can see how often queries are made.
You can see the client vCenter is querying to know the vsan host 1 FQDN multiple time per minute. AAAA is IPv6 /admin/queries.php
In a 24 hour day the 2 vcenters are popular with 29-31k! /admin/db_lists.php

Menu