Skip to main content

How to install DIG in Windows Machine

DIG is a domain query tool and a part of BIND package of ISC.
Using dig is very simple in Linux but is little bit tricky to use the same in Windows.

I have tried to do the same and sharing you the steps which i follow for configuring the dig in my windows machine.

How to install dig in Windows :-

1. Create a folder for dig (eg: C:\dig)

2. Download the latest version (currently which is 9.8.5-P2) of BIND software from here (ZIP format)

3. Extract the .zip file and copy the dig.* and *.dll files in the folder created in step 1

4. Add the folder in the Environment Variables path settings (Right click on My Computer --> click on Properties --> Advance System Settings --> Environmental Variables --> Path )

Use dig more efficiently (using .digrc) :-

dig gives lot of information in its output which may not be useful in most of cases (and may be annoying for some of us). To cut short the dig output to show you only the answer section, you need to give lot of parameters to instruct dig.

C:\Users\kansal>dig any +nostats +nocomments +nocmd +noquestion +recurse    
                                                                                                                                                  84      IN      AAAA    2001:4408:5200::a464:38bf                                     853     IN      A                                                           853     IN      NS                                                                   853     IN      NS                                                                   853     IN      NS                                                                 853     IN      NS       

Now to give lot of parameters in every query string is not feasible (especially to Windows guys who believe in using mouse more than keyword :) ).          

After going through the dig man page, i found  a b'ful solution to get rid of entering parameters every time.

Create a file and named it as ".digrc", and add the required parameters in that file.
dig command will read the parameters from that file and concatenate the o/p based on the parameters based in '.digrc' file.                                                                                                                         

I create a file ".digrc" in C:\dig\ folder. Now the problem is how to tell dig to where to find the .digrc file.

Solution of this is too simple. Just create a 'home' variable and add a value "C:\dig\" for the same.

Now to just check whether everything is working or not as per desired -

Bingo :) we get the desired output without giving  the required parameters.

P.S.- Bind 9.9.5 is the latest version of Bind which is in ESV (Extended Support Version). In this version, normal bind 9.9.5 dig utility wait continuously for indefinite period of time after query through dig command in Windows OS and user have to use Ctrl+C for getting the prompt again. This is a bug in Bind 9.9.5 dig tool which got hits when dig tool is used separately in windows environment (i.e., when only dig tool is used in Windows).
This bug has been rectified in Bind 9.9.5-W1 version which can be downloaded from here.

Popular posts from this blog

Identity PSK ( iPSK)

With the evolution of IoT (Internet of Things), devices that connect wirelessly have increased many folds. From webcams, Smartwatches, fitness bands, firestick, Alexa, Google Home, and many more.., everything is going wireless for connectivity and so does the security threat. The main concern with IoT devices is the unavailability of the full wireless protocol stack (and in the majority of devices, support of 802.1x is not available). So, previously we only have the WPA-PSK option for connecting the IoT devices.  In WPA*-PSK (WPA or WPA2) WLAN, a Pre-Shared Key (PSK) is configured and distributed to all the clients that connect to the WLAN. This leads to PSK leakage, and it can be accessible to unauthorized users (due to the nature of common PSK across all the devices).  Therefore, there was a need to provision unique PSK or Multiple PSK per SSID. Identity-PSKs are unique pre-shared keys created for clients/groups on the same WLAN. Features of iPSK:-   1.Unique PSK for individual Cli

Availability of 5 GHz WLAN Channels in India under unlicensed band

Availability of 5 GHz WLAN Channels in India under unlicensed band  In India, Wireless Planning and Coordination Wing of Department of Telecom, under Ministry of Communication takes care of licensing of radio frequencies.  In the latest National Frequency allocation plan 2018 (, Government of India (GoI), exempted the licensing requirements of the following radio frequency ranges for wireless usage and a gazette notification has also published for this (  -- 1.  5150-5250 2. 5250-5350 3. 5470-5725 4. 5725-5875 References

Is APNIC policy of Members Voting Rights doing the Justice with NIRs and Corresponding Countries

APNIC (the Asia Pacific Network Information Centre) is the regional Internet address registry (RIR) for the Asia-Pacific region, service 56 economies, including India, Bangladesh, China, Australia, Japan and others. APNIC is one of the world's five RIRs and is part of the Number Resource Organization (NRO). As of date, the following 7 NIRs (National Internet Registries) are registered with APNIC for serving the local community a b c -- NIR Serving Economy Member under each NIR d APJII (ID) Indonesia 2916 e CNNIC (CN) China  1399 IRINN (IN) India  3368 JPNIC (JP) Japan   474 KISA (KR) Korea Not Available TWNIC (TW) Taiwan   299 VNNIC (VN) Vietnam   624 APNIC Membership is classified into 7 tiers depending on the IP holding by each member. Each membership tier has voting rights. These voting rights play a crucial role in governance and policies matt