Place hostlookup anywhere in your path. ~/bin is a good choice for non-root users, /usr/local/bin or /usr/bin if you're root. Some different ways to feed addresses into hostlookup: $ echo 199.245.105.1 206.228.67.167 | hostlookup 199.245.105.1 shell.dhp.com. 206.228.67.167 slartibartfast.pa.net. $ hostlookup 199.245.105.1 206.228.67.167 199.245.105.1 shell.dhp.com. 206.228.67.167 slartibartfast.pa.net. $ ( echo 199.245.105.1 ; echo 206.228.67.167 ) | hostlookup 199.245.105.1 shell.dhp.com. 206.228.67.167 slartibartfast.pa.net. $ echo -e '199.245.105.1\n206.228.67.167' | hostlookup 199.245.105.1 shell.dhp.com. 206.228.67.167 slartibartfast.pa.net. $ cat some_file_containing_IPs | hostlookup ... $ hostlookup {type in addresses interactively} The output is in /etc/hosts format, so you can add the addresses to it easily. To do reverse lookups on an entire class B or C: $ hostlookup 127.0.0. or $ hostlookup 127.0. How to look up all non-rfc1918 addresses in /etc/hosts: cat /etc/hosts | \ sed -e 's/#.*//' | \ grep -v '^10\.' | \ grep -v '^192\.168\.' | \ grep -v '^172\.1[6-9]' | \ grep -v '^172\.2[0-9]' | \ grep -v '^172\.3[01]' | \ grep -v '^\W*$' | \ awk '{print $1}' | \ hostlookup To get the hostnames of all the people who've visted your web site: cat /var/log/httpd/*_log | awk '{print $1}' | uniq | sort | uniq | hostlookup >/var/log/httpd/all-web-hosts