Score:0

Bind9 resolve based on server's (own) IP address requested

cn flag

I have a bind9 DNS server with two (2) IP addresses assigned on it. Let's call them IP#1 and IP#2. I need a way to know which IP address the clients are using and respond with different results in their nslookup. I will try to explain with two examples below.

User "X" does nslookup against domainname.com with NS Server IP#1. The server should return a specific address.

User "Y" does the same nslookup against domainname.com with NS Server IP#2. The server should return a different address for him.

Any guidance on where to start looking would be a great help.

Score:1
cn flag

See bind "view" features at https://ftp.isc.org/isc/bind9/cur/9.18/doc/arm/html/reference.html#view-statement-grammar

You can match a specific zone content to a specific view and you can define a view depending on the destination IP address use, that is your server IP addresses.

view view_name [ class ] {
    match-clients { address_match_list } ;
    match-destinations { address_match_list } ;
    match-recursive-only yes_or_no ;
  [ view_option ; ... ]
  [ zone_statement ; ... ]
} ;

The view statement is a powerful feature of BIND 9 that lets a name server answer a DNS query differently depending on who is asking. It is particularly useful for implementing split DNS setups without having to run multiple servers.

Each view statement defines a view of the DNS namespace that is seen by a subset of clients. A client matches a view if its source IP address matches the address_match_list of the view’s match-clients clause, and its destination IP address matches the address_match_list of the view’s match-destinations clause.

While this feature exists and is used, note that it makes troubleshooting far more complicated, besides all problems of synchronizing data between various views. So take extra caution.

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.