pfSense DNS Resolution for DHCP Leases

Name resolution makes life easier for everything so today I’ll show you how I’ve setup my pfSense device to perform DNS resolution on devices registered via pfSense DHCP.

 

pfSense General Setup – Domain

In this example I’m going to use the default domain name configured with pfSense. Obviously this should be tweaked for your specific needs but if you are running this at home then localdomain is fine. My home lab actually has it’s own Active Directory DNS servers and I configure pfSense to forward any requests for that lab domain to those DNS servers.

pfSense General Setup

 

pfSense DHCP Server Domain Name Configuration

Having picked our domain name we need to check that the DHCP server in pfSense is configuring said name when issuing an address lease. Browsing to the ‘Services’ menu and then selecting ‘DHCP Server’ we need to scroll down to the ‘Other Options’ section. By default pfSense will use the name defined under the system setting we checked earlier. If you want to configure an alternate name for a specific DHCP range (e.g on a different subnet) you can do so here. If like me you prefer to see the option that is being used when scrolling through a config then add the domain here implicitly.

Services DHCP Server

Other Options Domain Name

 

pfSense DNS Resolver Settings

Now we can configure the pfSense DNS resolver settings to register DHCP leases in DNS to allow for easy name resolution. Browse to the ‘Services’ menu and select ‘DNS Resolver’.

Services DNS Resolver

 

Scroll down and select to register DHCP leases and if you are using static DHCP mappings, register those as well.

DHCP Registration and Static DHCP Registration in DNS Resolver

 

Testing Name Resolution

From my PC I now run a name resolution check to see if a Raspberry Pi I have configured on my network for dynamic DHCP has registered in DNS correctly and can be resolved. I also test to see if my Playstation 4 is resolved – it has a static registration so I’m showing that both dynamic and static entries are registering, just as we configured.

nslookup

 


 

The pfSense DHCP and DNS settings provide you with a huge range of options, certainly more than I have shown in this post, hopefully if you are looking to do something similar this post will assist you.

2 thoughts on “pfSense DNS Resolution for DHCP Leases”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.