I've been interested in running a caching DNS server off my Raspberry Pi for awhile, and with the recent Cloudflare announcement of their new DNS service and discussion around it, seemed like a good time to set it up.
I setup my device with Pi-hole a great bit of software which was easy to setup and provides a nice web interface. Along with DNS service, it includes ad and malware blocking service at the network level, which is great for configuring kid's tablet.
I bumped up the cache time and size with the following dnsmasq config:
# cache negative response (secs) neg-ttl=3600 # extend min cache (secs) min-cache-ttl=900 cache-size=25000
Curious to see how much faster my DNS queries would be, I pinged the Cloudflare service and then my new local DNS service. Surprisingly, Cloudflare was almost the same speed as my local network. Ping times to my local network were not impressive.
PING 192.168.86.184 (192.168.86.184): 56 data bytes 64 bytes from 192.168.86.184: icmp_seq=0 ttl=64 time=16.049 ms 64 bytes from 192.168.86.184: icmp_seq=1 ttl=64 time=15.162 ms 64 bytes from 192.168.86.184: icmp_seq=2 ttl=64 time=20.531 ms 64 bytes from 192.168.86.184: icmp_seq=3 ttl=64 time=14.097 ms 64 bytes from 192.168.86.184: icmp_seq=4 ttl=64 time=15.557 ms
My home network uses Google Wifi, with the main access point in the family room where the cable comes in and then a secondary access point in my office, the two access points communicate wirelessly.
The Raspberry Pi connects to the main access point via ethernet, and my computer connected to the secondary access point via wifi. The access point is relatively close to the computer, so I figured might as well try connecting the computer to the access point via ethernet and voila!
PING 192.168.86.184 (192.168.86.184): 56 data bytes 64 bytes from 192.168.86.184: icmp_seq=0 ttl=64 time=4.396 ms 64 bytes from 192.168.86.184: icmp_seq=1 ttl=64 time=3.465 ms 64 bytes from 192.168.86.184: icmp_seq=2 ttl=64 time=6.277 ms 64 bytes from 192.168.86.184: icmp_seq=3 ttl=64 time=3.846 ms 64 bytes from 192.168.86.184: icmp_seq=4 ttl=64 time=4.185 ms
A funny thing I was talking to a colleague about this, and he pointed me at this thread on Reddit where he made more or less the same comment.
I really want to run ethernet throughout my house, but our crawl space underneath is quite narrow and 🕷🕷🕷.