The debug log is exactly what you should use for this. You'd do well to explain a little more so that we can understand why don't want to use it.
Having said that, you could probably install a network packet sniffer such as WireShark, set up filters and logging and analyse that some way, but honestly the debug log is really the best way to do this and I'm struggling to think why you wouldn't want to use it.
dig
(domain information groper) and nslookup
(query Internet name servers interactively) are tools that query name servers. Unless a specific name server is specified as a commandline argument they will query the name server(s) found in /etc/resolv.conf. They simply don't look at alternative sources of host information such as the /etc/hosts
file or other sources specified in /etc/nsswitch.conf
.
If you want to force all dns queries through dnsmasq on your sun host, the /etc/resolv.conf
there should point to dnsmasq, i.e. it should look like:
#/etc/resolv.conf on sun
nameserver 127.0.0.1
To prevent that file from getting overwritten when you restart the network interface eth0 edit /etc/sysconfig/network-scripts/ifcfg-eth0
and add the option PEERDNS=no
Second in /etc/dnsmasq-resolv.conf
you're trying to configure dnsmasq to use itself as the upstream name server nameserver 127.0.0.1
... That file should look like:
#/etc/dnsmasq-resolv.conf
search beowulf.iecs biol.uregina.ca
nameserver 8.8.8.8
if you want to use Google's name server. It might be a good idea to use the University name servers 142.3.102.202 & 142.3.100.15 there instead as it is not uncommon to have certain resources only visible from the campus network.
If your mercury host is configured by DHCP it should get it's configuration from dnsmasq and the /etc/resolv.conf
there points to the dnsmasq name server on 192.168.42.1
Best Answer
Sadly you can not log what you do not have. The DNS is never asked for the URL. The DNS is only asked to resolve the host name to an IP. The DNS protocol does not deal with anything else.