Discussion:
[Unbound-users] Have static records in forwarded zone
Alexander Chekalin
2015-07-10 10:08:13 UTC
Permalink
Hello,

I try to create a bit strange setup. I use unbound as a caching server
and it works fine. Then, I need it to resolve only limited set of
domains, so I add something like:

do-not-query-address: 127.0.0.0/8

forward-zone:
name: "incapdns.net."
forward-addr: 8.8.8.8
forward-addr: 8.8.4.4

forward-zone:
name: "."
forward-addr: 127.0.0.255

to the config and all that unbound can resolve is incapdns.net domain.


Now it the tricky part. In our company we have a domain that is on
external DNSes and it warks fine but I need to have several records
modified. Say, if you query for mail.domain.com from outside it answer
you with IP of our office but if you query the same name from inside the
LAN it should answer you with LAN address of mail server.

So what I'd like to do is to have something like that:

local-zone: "domain.com" typetransparent
local-data: "mail.domain.com A 192.168.17.2"

but this won't work.

How can I create the setup I need? I understand this is the case where
split zone fits nicely but then I'll need to maintain the whole zone
both remotely and locally, and I'd like to forward it to zone's DNSes
for all records but for these that I have locally.

Thank you in advance,
Alexander
Benno Overeinder
2015-07-10 13:17:41 UTC
Permalink
Hi,
Post by Alexander Chekalin
local-zone: "domain.com" typetransparent
local-data: "mail.domain.com A 192.168.17.2"
but this won't work.
Maybe you meant:

local-zone: "domain.com." typetransparent
local-data: "mail.domain.com. IN A 192.168.17.2"

-- Benno
--
Benno J. Overeinder
NLnet Labs
http://www.nlnetlabs.nl/
Alexander Chekalin
2015-07-10 13:26:54 UTC
Permalink
Yes, you're right, but I'm not sure if typetransparent solves my question.

What I need is to serve static records from config for several hosts and
forward all other records to the public recursors like 8.8.8.8 - will
typetransparent do exactly that?
Post by Benno Overeinder
Post by Alexander Chekalin
local-zone: "domain.com" typetransparent
local-data: "mail.domain.com A 192.168.17.2"
but this won't work.
local-zone: "domain.com." typetransparent
local-data: "mail.domain.com. IN A 192.168.17.2"
Sonic
2015-07-10 14:18:07 UTC
Permalink
On Fri, Jul 10, 2015 at 9:26 AM, Alexander Chekalin
Post by Alexander Chekalin
Yes, you're right, but I'm not sure if typetransparent solves my question.
It's the right type, nut you may have other issues you're overlooking.
If you're enforcing that private-address range you'll need to to add a
private-domain statement for the local domain. If you're validating
you may need to add a domain-insecure statement for the local domain.
Ex:
=====================================================
private-domain: "domain.com"
domain-insecure: "domain.com"
local-zone: "domain.com." transparent
local-data: "mail.domain.com. A 192.168.17.2"
=====================================================

Chris
Norberto Altalef
2015-07-10 14:36:38 UTC
Permalink
Hi. I'm am unbound beginner, so take my opinion with caution.

transparent and typeransparent are very similar and only differs in
how manage a query for a record type not included in localdata. See
man unbound.conf

I think you need something like this:

forward-zone:
name: "domain.com"
forward-addr: 8.8.8.8

But I'm not how can you avoid that your forward-zone "." take precedence.

I know that you can separate sections with aditional server: lines,
but I don't know how respond in this case.

Regards
Norberto




www.redklee.com.ar
tel [+54] 11 5273 6342
cel [+54 9] 11 5055 9853
linkedin



On Fri, Jul 10, 2015 at 10:26 AM, Alexander Chekalin
Post by Alexander Chekalin
Yes, you're right, but I'm not sure if typetransparent solves my question.
What I need is to serve static records from config for several hosts and
forward all other records to the public recursors like 8.8.8.8 - will
typetransparent do exactly that?
Post by Benno Overeinder
Post by Alexander Chekalin
local-zone: "domain.com" typetransparent
local-data: "mail.domain.com A 192.168.17.2"
but this won't work.
local-zone: "domain.com." typetransparent
local-data: "mail.domain.com. IN A 192.168.17.2"
_______________________________________________
Unbound-users mailing list
http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users
Loading...