Score:2

DNS - Unbound - How to provide different IP for a server based on client network

cn flag

We have an intranet DNS server using Unbound in FreeBSD. We have another file server with multiple network IP, First one is 10.10.10.10 and Second one in 192.168.10.10.

Is there any way that DNS server provide different IP for this file server based on the client network?

Eg: For the user from 10.10.x.x network, fileserver ip should be 10.10.10.10 For the user from 192.168.x.x network, fileserver ip should be 192.168.10.10.

yagmoth555 avatar
cn flag
I'am not a BSD expert, but I know in enterprise grade firewall you can do a reverse NAT policy to solve that problem. That make that if a request for the bad IP come inside the LAN, it rewrite the destination to the correct IP. Like if in 10.10.10.* and it request 192.168.10.10, the router correct to 10.10.10.10 the conversation
us flag
Rob
The jargon term for that is usually "split horizon" - See this answer: https://serverfault.com/a/1058218/960939 using the `access-control-view` feature and the docs here: https://unbound.docs.nlnetlabs.nl/en/latest/topics/filtering/tags-views.html
Score:3
us flag
Rob

How to provide different IP for a server based on client network

The jargon for that is normally "split horizon DNS".

In Unbound that is implemented via "tags and views" functionality. Those make it possible to send specific DNS answers based on the IP address of the client.

The tags functionality makes it possible to divide client source addresses in categories (tags), and use local-zone and local-data information for these specific tags.

A view is a named list of configuration options. The supported view configuration options are local-zone and local-data.

A view is configured using a view clause. There may be multiple view clauses, each with a unique name. For example:

view:
    name: "firstview"
    local-zone: example.com inform
    local-data: 'example.com TXT "this is an example"'
    local-zone: refused.example.nl refuse

...

Mapping a view to a client can be done using the access-control-view element:

 access-control-view: 10.0.5.0/24 firstview
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.