forward-zones recursor option takes multiple IPs for a domain. #81

Closed
Habbie opened this Issue Apr 26, 2013 · 14 comments

Projects

None yet

2 participants

@Habbie
Member
Habbie commented Apr 26, 2013

It would be helpful if the recursor could forward zones to multiple IPs.

For example I can say:

forward-zones=foozone.com=10.0.0.2

But what if 10.0.0.2 is down? I would like to forward requests to
another IP if the first fails, so something like this:

forward-zones=foozone.com=10.0.0.2;192.168.1.2

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie
Member
Habbie commented Apr 26, 2013

Attachment 'Path that allows multiple IPs per forward zone' (multi-forward.patch) https://gist.github.com/5466891

@Habbie
Member
Habbie commented Apr 26, 2013

Attachment 'Updated patch for snapshot4, also has support for forward-zones-file (separate forwarders with comma)' (multi-forward-snapshot4.patch) https://gist.github.com/5466892

@Habbie
Member
Habbie commented Apr 26, 2013

Author: augie.schwer@gmail.com
Bind does this:

zone "some.rbl." {
type forward;
forward first;
forwarders { 10.0.0.1; 10.0.0.2; };
};

Which would make bind forward requests to the two listed forwards and fall
back to standard recursion if neither where available.

@Habbie
Member
Habbie commented Apr 26, 2013

Author: kkkkoaaa
Keep a good job up! http://quick-adult-links.com

@Habbie
Member
Habbie commented Apr 26, 2013

Author: yusufg@outblaze.com
another option would be to use a syntax similar to auth-zones where forward-zones=foozone.com=/var/foozone.com

/var/foozone.com would contain IP's one per line
10.0.0.1
10.0.0.2 and pdns-recursor would randomly send queries to each IP's. This is similar in approach to what dnscache uses for split-horizon DNS

@Habbie
Member
Habbie commented Apr 26, 2013

Author: dgamble
At the risk of being a "me too", this feature is singlehandedly preventing us from replacing our internal BIND forwarders with PowerDNS. Being able to forward to multiple servers in case of failure is a requirement for any HA infastructure.

@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
Same here, we have a setup of two recursors used for the mailclusters which are configured to forward to rbldnsd on the same box (another port) or, if not reachable, to the rbldnsd running on the sibling.

The ability to configure not only several IP(v4|v6) addresses but also port numbers would be greatly appreciated.

Thanks for the great work.

@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
Bert, it looks like your r963 fixes this:

http://wiki.powerdns.com/cgi-bin/trac.fcgi/changeset/963

@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
Replying to [comment:8 anon]:

Bert, it looks like your r963 fixes this:

http://wiki.powerdns.com/cgi-bin/trac.fcgi/changeset/963

I don't think so, that allows you to move the definition of forward zones to an external file, but it still only allows exactly one IP per zone. You cannot specify multiple zones according to the sample config, and reading the code in the changeset I'm pretty sure that is not possible yet.

@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
I've attached a patch to allow multiple IPs for each forwarded zone, separated by semi-colons. This works with both the forward-zones and forward-zones-file options.

Since the recursor is already capable of using multiple nameservers for a domain, this was just a matter of passing a vector along instead of a single string. The built-in health/performance tracking of the servers also automatically applies.

Aaron Thompson
acthompson@gmail.com

@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
Bert, any chance of getting this patch in before the release of 3.1.5? For cleanliness, forward-zones-file should probably also be fixed to support several forwarders per zone..

@Habbie
Member
Habbie commented Apr 26, 2013

Author: ahu
Implemented in commit 1168, and documented as well, thanks!

@Habbie
Member
Habbie commented Sep 6, 2016

@atlanteg this is a closed issue, and our bug tracker is not a support forum. Please see https://blog.powerdns.com/2016/01/18/open-source-support-out-in-the-open/ for an extensive description of the ways in which you can get support.

@ankse
ankse commented Sep 20, 2016

Hello, how can set BIND forward PDNS SERVER?

i set
zone "server.163.org" { type forward; forwarders { 10.0.0.1 port 53; }; };

but no use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment