0

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 { 1.2.3.4; 5.6.7.8; 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.

Bob B.
  • 37
  • 3
  • 7

2 Answers2

1

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

server=/firstpartner.com/1.2.3.4
server=/firstpartner.com/5.6.7.8
server=/secondpartner.com/4.3.2.1
mgorven
  • 30,615
  • 7
  • 79
  • 122
  • 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
1

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.

Chris Buechler
  • 2,998
  • 14
  • 18
  • 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 08 '13 at 22:08