Using the MVPS.ORG Hosts file with ISC Bind

I run my own DNS in our home. You may think this is crazy, but test after test has shown that nearly all ISPs provide substandard DNS to their customers. Even the finest DNS servers are only responsive 95% of the time. With the number of times you use DNS, you could be losing seconds or minutes per day while you wait for timeouts and rerequests.

Mvps.org maintains a list of “known bad domains”. While it is certainly not a replacement for other security measures, its another line of defense. It is another tool in the bag. For more reasons, read their site.

http://www.mvps.org/winhelp2002/hosts.htm

I don’t want to maintain host files on all of my home systems and all of the VMs too, I’d like to just tell my DNS server about these hosts and have it do the right thing.

By combining the downloaded hosts file and using this little boo script to map it into bind config, I have done just that. I use include files to bind. I’ve added a line like this to my /etc/bind/named.conf.local on my ubuntu server

include "/etc/bind/named.conf.mvps";

Then, I’ve added the output of this boo script to the /etc/bind/named.conf.mvps file. Reload bind and everything is done.

import System.IO
for line as string in [line for line in  @/\n|\r\n/.Split( File.OpenText("HOSTS").ReadToEnd() ) if (not line.StartsWith("#") and line!=string.Empty and not line.Contains("localhost"))]:
    fields = @/ +/.Split(line)
    if (fields.Length > 1):
      host = fields[1]
      print "zone \"${host}\" { type master; file \"/etc/bind/db.local\"; };"

Before hand, host resolution looked like this:

$ host ad.a8.net
ad.a8.net has address 203.190.224.60

After reloading bind, it looks like this:

$ host ad.a8.net
ad.a8.net has address 127.0.0.1
ad.a8.net has IPv6 address ::1

Windows 7 Libraries and Search in Explorer

With Windows 7 at release candidate now, I wanted to review some of my favorite features which were announced 8+ months ago at PDC08.

http://channel9.msdn.com/pdc2008/PC16/

After a little Google searching I found this Search Connector Pack:

http://www.redmondpie.com/search-connectors-for-windows-7-federated-search/

IMO its very cool to have the Wikipedia Search Connector where I can view all of the hits in what is normally the files view in Explorer, and view the wikipedia page in the Preview pane (alt-p if you can’t see it).

Wikipeida_RSS_Win7SearchConnector_2009-05-24_14-03-47

Browsing NHibernate Source Can Be Beautiful

NHibernate is awesome, but when Oren’s blog doesn’t have for what you are looking, and your google-fu is coming up short, it can be challenging to find what you want.

http://nhforge.org – is excellent, but almost never comes up in google searches.

http://nhibernate.sf.net – the sourceforge page redirects to http://nhibernate.org which in turn redirects to the http://hibernate.org nhibernate area.

I often want to browse the source. I just need to quickly see what they have done, and I don’t want to open the nhibernate sln on my system.

http://nhibernate.svn.sourceforge.net/viewvc/nhibernate/

I had to hunt around for more than a minute, to find the above url, but rest assured, it is viewvc pointed to nhibernate svn hosted by sourceforge.

If you can’t tell, I love viewvc.

Windows 7 DhcpNodeType Is Still a Bummer: How I returned from teched09 to have a broken network

https://connect.microsoft.com/windows7/feedback/ViewFeedback.aspx?FeedbackID=452703

I use file sharing on my home network quite a bit. I don’t have a large hard drive in my laptop. I use network shares at home to watch video downloads (all Mix08, PDC08, Mix09 content!) and store some personal files.

I don’t use Active Directory. I don’t use Windows Servers. Why would I do that at home? I’m a home user after all.

Enter Windows Behavior Fail. I connected to exactly 3 wifi networks while I was away at TechEd09: TechEd, Comfort Inn, and t-mobile @ LAX. One of them used DHCP to force my node into Netbios Name Resolution point to point mode, rather than its normal hybrid mode. This means that instead of broadcasting for a netbios name, my client host would talk only to the specified WINS browser on the network.

Except I don’t have a WINS server on the network, which effectively disables Netbios Name Resolution. I came back home, plugged into (or Wifi connected, either way is the same) my home network, and I had no access to my file shares.

I’ll bet a Mac would never do this.

So, if you ever use Windows (not just if you call yourself a Windows user, mind you). Please click the link at the beginning of this post and beg Microsoft to change their behavior. I can understand disabling WINS while I am on a public WIFI. Heck, I might ever recommend it to some customers who have public WIFI, but for the setting to not revert after I am back on a different network which does not set this DHCP setting is simply unacceptable.

Of course, the network administrators work around is to forcefully set this DHCP setting to hybrid. That is fine for savvy network administrators, but it is NOT fine for the rest of us with Linksys routers doing the job of DHCP.

Incidentally, if you happen to run ISC DHCP (which I highly recommend), you can send this setting to your DHCP clients with this setting in your subnet block:

option netbios-node-type 8;

I hate to rant like this immediately after TechEd09 (which was an awesome event), but it was the most pressing issue on my return home.

TechEd 2009

I’m leaving tomorrow to go to TechEd 2009. I’ll be working the C# and F# “Ask The Experts” booths for half of the day each day Monday through Thursday. When I’m not there, I’ll be catching sessions and pretending to be an open sourcer by hanging in the Mono booth.

If you want to meet, or just say hi, stop by and do so!