From owner-freebsd-questions@FreeBSD.ORG Tue Oct 23 17:02:48 2007 Return-Path: Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 010DE16A421 for ; Tue, 23 Oct 2007 17:02:48 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id 6FFBF13C4BB for ; Tue, 23 Oct 2007 17:02:47 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id l9NH0Hu3043965; Tue, 23 Oct 2007 19:00:23 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id l9NH0HKu043964; Tue, 23 Oct 2007 19:00:17 +0200 (CEST) (envelope-from olli) Date: Tue, 23 Oct 2007 19:00:17 +0200 (CEST) Message-Id: <200710231700.l9NH0HKu043964@lurza.secnetix.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG, ecrist@secure-computing.net In-Reply-To: <5E76A4F8-0C80-412F-BA07-99CFEC08E062@secure-computing.net> X-Newsgroups: list.freebsd-questions User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 23 Oct 2007 19:00:23 +0200 (CEST) Cc: Subject: Re: reverse DNS resolution... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@FreeBSD.ORG, ecrist@secure-computing.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2007 17:02:48 -0000 Eric F Crist wrote: > As I already stated, if I do a host 172.30.x.x, I get a the correct > reverse resolution. dig works as well. What isn't working is the > reverse resolution in certain command outputs, etc. Note that the DNS tools (host, nslookup, dig) use their own resolver code, not the one from FreeBSD's libc, like all other tools. That might explain the difference. Make sure that you have configured /etc/nsswitch.conf and /etc/resolv.conf correctly. Also note that /etc/hosts overrides DNS by default. You can use tcpdump to check if a reverse lookup request is sent to the DNS server when the failure occurs, and what the reply looks like. E.g. let this command run in one terminal: # tcpdump -i tun0 -s 1500 -l -n -vvv udp port domain Add an -i option to specify the interface to listen on, if you have multiple interfaces (e.g. -i fxp0). Then run the command (w, irc client, whatever) in another terminal and watch the tcpdump output. Oh by the way, I think the addresses in IRC are resolved by the servers, not by the clients, so you would have to run the tcpdump command on the IRC server (if it's an internal one to which you can login and have root access). Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd PI: int f[9814],b,c=9814,g,i;long a=1e4,d,e,h; main(){for(;b=c,c-=14;i=printf("%04d",e+d/a),e=d%a) while(g=--b*2)d=h*b+a*(i?f[b]:a/5),h=d/--g,f[b]=d%g;}