This question arises from my LQ thread "OOo: when no Internet: very slow to start and does not open file"
in which Skaperen
kindly helped me resolve the underlying problem as dnsmasq querying the upstream DNS servers to resolve the local machine, CW8, which is listed in /etc/hosts when OOo tries to resolve that name.
Research showed that this is default dnsmasq behaviour and that solution (as I understand it) is to:
- Add an entry in /etc/hosts for the local computer including a local domain name. This was done (the registered domain name is required for sendmail to send mail as originating from that domain)
192.168.1.47 CW8 CW8.<registered domain name not shown> CW8.localdomain
- Configure dnsmasq:
- To add a domain name to hostnames without domain names
- With a domain name to add as above
- To use only /etc/hosts for the local domain
I changed /etc/dnsmasq.conf accordingly, adding:
# Set this (and domain: see below) if you want to have a domain
# automatically added to simple names in a hosts-file.
# Set the domain for dnsmasq. this is optional, but if it is set, it
# does the following things.
# 3) Provides the domain part for "expand-hosts"
# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
After making these changes and restarting dnsmasq I tested by opening an OOo document and saw that the changes had not stopped
root:/etc# tcpdump -nnl -i eth0 -s 1536 dst port 53
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 1536 bytes
23:51:57.224344 IP 192.168.1.47.55058 > 22.214.171.124.53: 9959+ A? CW8.(none). (28)
23:51:57.274656 IP 192.168.1.47.39046 > 126.96.36.199.53: 43484+ A? CW8.(none). (28)
What to do?
EDIT: I just found a current LQ thread
asking a very similar question, without a solution at the time of writing -- but solved by the OP within the hour.