A few Linux nuggest

In general, it’s a bad idea to start a file name with a dash (-). For example, a file named –help is going to give you all kinds of trouble. Say you want to rename the file. mv –help help.txt is going to show you the help for the mv command. You’ll have to give it a path name: mv ./–help help.txt.

Say you’re behind a router and you want to know your external IP address. If you have a Web browser, you can go to www.whatismyipaddress.com or one of the scads of similar sites returned by a Google search of “what is my ip address”. But from the Linux command line? The easiest one I found (i.e. the program was already installed) was using wget. The following will show you your external IP address:

wget -O - -q icanhazip.com

By the way, going to http://icanhazip.com from your browser will also tell you your IP address.

If you’re configuring a local DNS cache, you probably don’t want to include your ISP’s DNS servers in the forwarders section of named.conf.options. If you do that, then all DNS requests will be forwarded to your ISP’s DNS server. What you really want is to query the root name servers. Just leave the forwarders blank. You’ll get better performance and you won’t annoy your ISP. Here’s a properly configured forwarders section:

forwarders {
// to query the root name servers,
// don't put any IP addresses in here.
}

Running BIND on the latest Ubuntu release, the root hints file is at /etc/bind/db.root. The root servers change from time to time, so it’s a good idea to keep this file updated. You can get the latest file from ftp://ftp.internic.net/domain/. Three files appear to contain the same information: db.cache, named.cache, and named.root. You can download any one of them, copy it to your /etc/bind/ directory as db.root (after making a copy of the existing file), and then tell BIND to reload its database: sudo rndc reload.