Table of Contents

Back to Tech Documentation


DNS

Depending on the DHCP assignment group, clients in the house get one of 3 DNS configurations:

Surfrock66 Bind DNS

This is a bind server running on sr66-ipam-01 at 10.2.2.213 on port 53. It should be the primary DNS responder to the house. It has 3 categories of DNS zones:

Bind responds based on “ACLs” or Access Control Lists which are just subnets/IP blocks. 3 are defined but we only use 2 actively:

Surfrock66 PiHole

PiHole is running as an ad and tracking blocking service on sr66-ipam-01 on port 5354. Once pihole was set up, it was not intuitive to move it to listen on another port (understanding Bind is listening on the normal DNS port). PiHole uses DNSMasq under the hood, and to change the port add “port=5354” to “/etc/dnsmasq.d/02-changeport.conf” and restart the service.

New External DNS Aliases

If you want to add a new DNS Alias which works both externally and internally, open cPanel, go to “Zone Manager”, select the domain (usually surfrock66) and click the “manage” button, then add an A record with a 300s (5m) TTL with the IP set to the current IP of the house.

We then need to edit the script which keeps the DNS records dynamically pointed at the house. On sr66-ipam-01 edit /home/surfrock66/.scripts/cpanel/cpanel-dynamic-dns-all.sh and add a new code block for the new DNS alias.

Now we need to define the zone in bind. Edit /etc/bind/named.conf and find the records for local zonefiles, and copy a syntax block with the new domain name. You will need to do this within each “view” of the config file. You will see that you will be pointing to a new zone file which doesn't exist yet.

Lastly, you will need to create said zone file in /etc/bind/zones/. I recommend copying an existing zone, then modifying it with the new domain name. Make sure to update the date timestamp at the top, then when done, make sure the “bind” user owns the file. Restart bind9 for this to take effect.

Chromecast DNS

The Chromecasts have very complex networking requirements as they constantly ping google and will fail if they cannot get to google, and by default they do not like being behind VLANS and having their DNS captured by pihole. For this reason, we have a complex configuration to support the Chromecasts:

  1. On sr66-opnsense-1, in Firewall → NAT → Port Forward, there are redirect rules for all DNS requests to be sent to sr66-ipam-01.
  2. On sr66-opnsense-1, in Services, there is a UDP Broadcast Relay to help redirect multicast DNS as needed.

Back to Tech Documentation