Compile dig with EDNS client-subnet support

This information is now obsolete. EDNS client-subnet was officially merged into BIND 9.10.0b1 with option +subnet:

$ dig +subnet=

Download and extract BIND.

$ wget
$ tar xf bind-9.9.3.tar.gz
$ cd bind-9.9.3

Download the patch from Wilmer van der Gaast.

$ wget

Patch the code, configure (without OpenSSL because we only want dig) and compile.

$ patch -p0 < bind-9.9.3-dig-edns-client-subnet-iana.diff
$ ./configure --without-openssl
$ make

Now you will have dig placed in bin/dig. You can try it this way:

$ ./bin/dig/dig +client=

Note the CLIENT-SUBNET line in the answer OPT PSEUDOSECTION.

← jnisigl