pfSense - How to add a MX record to a local zone

My plan was to have a Zimbra e-mail server running in VirtualBox using the internal networking model with a local domain. To make this work, I have a virtual pfSense box running on the same internal network to provide “outside” access. Additionally, pfSense is also running a DNS resolver so I figured it would be a trivial matter to add the local records I needed.

On the DNS Resolver configuration page you have the option to add “Host overrides” but that only adds A and PTR records. However, the button labeled “Display Custom Options” provides the opportunity to add records directly to Unbound. The syntax is pretty straight forward as shown below (gracefully lifted from Unbound’s detailed example configuration file):

# a number of locally served zones can be configured.
# 	local-zone:  
# 	local-data: ""
# You can add locally served data with
# local-zone: "local." static
# local-data: "mycomputer.local. IN A"

Regarding my own local zone, I ended up with the following records (including A, MX and PTR):

# local zone
local-zone: "" static
local-data: " IN A"
local-data: " IN A"
local-data: " IN MX 10"
local-data-ptr: ""

The screenshot below shows the corresponding entries from pfSense (remember to restart the service after changes):

pfSense DNS Resolver

pfSense 2.3.4- Services / DNS Resolver / General Settings

Roger Comply avatar
Roger Comply
Thank you for reading!
Feel free to waste more time by subscribing to my RSS feed.