Date: Fri, 25 May 2001 18:54:18 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: current@freebsd.org Subject: Re: Strange DNS behavior; I'm stumped Message-ID: <200105251854.LAA12273@usr05.primenet.com>
next in thread | raw e-mail | index | archive | help
] Here's the rub: when I start X, my window manager ctwm tries to ] determine the hostname (to assign to HOSTNAME and then m4-process the ] .ctwmrc) This causes my machine to dial out. I've used tcpdump on port ] 53 (dns) by putting this in /etc/start_if.isp1: ] /usr/sbin/tcpdump -nli isp1 -c 16 port 53 > /tmp/tcpdump.53 & ] so I capture the very first dns packets. The result is: Make your test program do a gethostbyname(), like it does. Then take the resulting IP address, and call gethostbyaddr(), to get the _canonical_ name and IP address of the host you obtained by name, so that it will give you the A record name of the host, instead of some CNAMe which may be transient. Now watch your modem dial out, because you have not set up correct in-addr.arpa delegations for all of your local IP addresses in your DNS server. Now look up. See the lightbulb. Correct the missing in-addr.arpa. delegations. See that you have the same problem. Realize that you need to run a local authoritative in-addr.arpa. nameserver. Realize that doing this will destroy your ability to do reverse address resolution for any host not on your local net. Consider switching to a less anal window manager. Realize that you can run a caching-only local nameserver. Now look up. See the lightbulb. Now preload the caching n-only name-server's cache for all local IP addresses with data (long lived data) for the in-addr.arpa. delegations which would exists, were you to own your own IP addresses in reality. Preload your cache in the file, and restart your nameserver via SIGHUP. Try it again. See that the problem is fixed. Smile. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105251854.LAA12273>