NXDomain Redirection


What is NXDOMAIN Redirection?

NXDOMAIN redirection provides the ability for a recursive server to replace an NXDOMAIN response to a query with a configured answer of its own - usually pointing to a helpful service site. This substitute response is returned to the original client in place of the NXDOMAIN response received by the server. 

The ability to configure a redirect zone was first introduced in BIND 9.9.0. (BIND 9 Subscription Version and BIND 9.10 extend this by allowing BIND to provide responses based upon an API to an external user-developed module - for example, DLZ or a coded back-end.

How to set up:

1. Open the guardian CLI and edit: "/data1/etc/namedb/global_include.conf”

vi /data1/etc/namedb/global_include.conf

create the zone of type redirect:

zone "." {
type redirect;
file "/data1/users/admin/db.redirect" ;
};

Note: use shit+ i to insert, then click escape and :wq to save.

2. Change directory to “/data1/users/admin”.

cd  /data1/users/admin

3. create the db.redirect file, and add the server name and the redirect IP, in this example I am adding the guardian FQDN and the redirect IP 37.131.20.58, and save the file:

vi db.redirect

$TTL 300
@ IN SOA guard.eip.local. hostmaster.eip.local 0 0 0 0 0
@ IN NS guard.eip.local
*. IN A 37.131.20.58

4. Restart the DNS service:

/usr/local/etc/rc.d/ipmdns.sh restart

5. check the DNS service status

/usr/local/etc/rc.d/ipmdns.sh status

6. test and confirm its working :)


Did you find this article useful?



  • Measure QPS on BIND9

    BIND9 DNS engine was installed on Ubuntu server, the goal is to measure the QPS by enabling the statistics.Installing the BIND9 command: sudo apt inst...

  • Enabling DNSSEC on an external zone

    Domain Name System Security Extensions (DNSSEC) is used to strengthen DNS protocol security.It controls the integrity of all DNS answers and ensures t...

  • Utilizing ioc2rpz.net as open source RPZ

    ioc2rpz community is a portal which provides open source DNS Firewall / RPZ feeds. The DNS Firewall feeds are based on publicly available threat intel...

  • Enable Guardian for nonsupported interfaces

    Broadcom interface is not supported by default, only intel interfaces are supported for the Guardian service. this workaround only for POC: 1. login...

  • Cascaded DNS

    EDNS: Port 53 is reserved for DNS usage, DNS uses both UDP and TCP for message transport.Conventional message exchanges are short, and thus well suit...