Friday, January 08, 2010

Cygwin & Bind tools: Don't forget /etc/resolv.conf!

I recently started a new job and was installing all my Windows tools (yup, back in Windows!). Installed Cygwin and added a few tools, specifically I had gotten used to using host & dig during my stint doing linux administration, so I added in the Bind distribution for Cygwin. When I tried to use host or dig I got an error: ;; communications error: connection reset

After some researching I found that although bind works in cygwin the /etc/resolv.conf is not created. You have to do that manually. I created the file (see example below) and the commands now work fine. Figuring out your nameservers is up to you for now.

This was on Windows Server 2003 SP2 using CYGWIN_NT-5.2 forsrayd 1.7.1(0.218/5/3).

My resolv.conf (valid ips removed):
nameserver x.x.x.x
nameserver x.x.x.x