Do not setup any records in the pihole GUI.
SSH into pihole raspberry pi or VM.
sudo nano /etc/dnsmasq.d/50-cnames.conf
address=/.apps.sbx.somesystem.net/10.10.8.XXX
address=/apps-crc.testing/10.10.8.XXX
address=/api.crc.testing/10.10.8.XXX
Edit this file:
sudo nano /etc/dnsmasq.d/02-lan.conf
To add this line:
addn-hosts=/etc/pihole/lan.list
Save your changes.
Add your local hostnames and IP addresses to lan.list:
sudo nano /etc/pihole/lan.list
Add each hostname and IP addresses pair to the file, one pair on each line, like this:
10.10.8.XXX myMachine.somesystem.net
Restart pihole DNS service
sudo pihole restartdns
Test pihole DNS service from another computer
$ host 10.10.8.XXX
245.8.10.XXX.in-addr.arpa domain name pointer crc.somesystem.net.
$ ping console-openshift-console.apps-crc.testing
PING console-openshift-console.apps-crc.testing (10.10.8.XXX) 56(84) bytes of data.
64 bytes from crc.somesystem.net (10.10.8.XXX): icmp_seq=1 ttl=64 time=0.465 ms
64 bytes from crc.somesystem.net (10.10.8.XXX): icmp_seq=2 ttl=64 time=0.382 ms
^C
--- console-openshift-console.apps-crc.testing ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.382/0.423/0.465/0.041 ms
$ telnet apps-crc.testing 443
Trying 10.10.8.XXX...
Connected to apps-crc.testing.
Escape character is '^]'.