I'm not sure if dnsmasq is involved in this process on pfSense or not.

Before pfsense, we'd do this in BIND thusly:

zone "firstpartner.com" { type forward; forwarders {;; w.x.y.z; };

I'm intentionally over-explaining this in the interests of specificity:

We currently use dnsmasq to direct local queries for our primarydomain.com. Anything that doesn't match a host override entry in pfSense gets passed off to our external name servers, as defined elsewhere in pfSense.

There are certain other zones which are not publicly accessible, let's call them firstpartner.com and secondpartner.com that each have various subdomains that their own name servers handle.

I need a way to define a list of name server IPs for each domain zone (see BIND example above).

Thanks in advance for any help you can provide.


Just add domain forwarding entries at the bottom of the Services>DNS Forwarder page. Add multiple entries for the domain if you have multiple servers for it.

| improve this answer | |
  • Selected this answer over the other, because of it's specificity to pfsense, not just dnsmasq (although mgorven's dnsmasq syntax was definitely appreciated). – Bob B. Apr 8 '13 at 22:08

You can configure dnsmasq to forward queries for certain domains to specific nameservers. Add something like the following to /etc/dnsmasq.conf:

| improve this answer | |
  • Hello and thank you for your reply.Do you know if this type of configuration works like primary/secondary/tertiary DNS (ie. if the first one in the list doesn't respond, it will move on to the next) or will it just find the first one, fail to get a response and then stop? – Bob B. Oct 25 '12 at 20:14
  • @BobB. dnsmasq will failover to the next IP if the first one doesn't respond. – mgorven Oct 25 '12 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.