"rule based" A records

Reindl Harald h.reindl at thelounge.net
Sun Jan 14 11:36:01 UTC 2018

Am 14.01.2018 um 12:27 schrieb Lucio Crusca:
> I'm not sure this feature exists, and, even then, I don't know how it's 
> called.
> I need my Bind to resolve names to different IP addresses based on the 
> subnet the request comes from.

the word you are seeking is "views"


> E.g. I have a Bind instance on a Debian virtual server 
> (network Then I have a web server on another Debian 
> virtual server, same local network.
> The host system has only one public IP address and forwards connections 
> to the correct virtual server based on the TCP/UDP port.
> PHP code of the websites often needs to contact the same hosted websites 
> by name: however all the websites names resolve to the public IP address 
> of the host, and the host does not route connections coming from the 
> virtual hosts back to the same virtual hosts

either use views or different nameservers for LAN and WAN
i prefer seperate nameservers (master and slave) for the LAN

just because there are also hostnames which are not public at all and 
for all other zones outside our own the zone-generator writes for the 
public nameservers different files that for the internal with a
simple replace - but that needs homegrown stuff to begin with

More information about the bind-users mailing list