From owner-freebsd-questions@FreeBSD.ORG Tue Jan 9 14:43:15 2007 Return-Path: X-Original-To: freebsd-questions@FreeBSD.ORG Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD4B416A403 for ; Tue, 9 Jan 2007 14:43:15 +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 3067113C459 for ; Tue, 9 Jan 2007 14:43:12 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (apqbqj@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l09Eh6nR012959; Tue, 9 Jan 2007 15:43:12 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l09Eh6Jx012958; Tue, 9 Jan 2007 15:43:06 +0100 (CET) (envelope-from olli) Date: Tue, 9 Jan 2007 15:43:06 +0100 (CET) Message-Id: <200701091443.l09Eh6Jx012958@lurza.secnetix.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG, George.Vanev@gmail.com In-Reply-To: <6f4f57f60701090556v35b55b2cn9bbcd363c588b002@mail.gmail.com> X-Newsgroups: list.freebsd-questions User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 09 Jan 2007 15:43:12 +0100 (CET) Cc: Subject: Re: Automatically get nameservers X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@FreeBSD.ORG, George.Vanev@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2007 14:43:15 -0000 George Vanev wrote: > I have a FreeBSD 6.1 box for a gateway. > It connects to ISP via pppoe. > In /etc/ppp/ppp.conf i have this line: > enable dns > so I have the necessery nameserver-s in /etc/resolv.conf > So far, so good... > I want Windows client machines, connected to the FreeBSD box > to get the nameservers automatically. > Can you tell me how this may be done?! There are several ways to do it. Personally I have simply set up an own nameserver on the FreeBSD machine (just named_enable="YES" in /etc/rc.conf) and enabled "forward only" in /etc/namedb/named.conf. Then I wrote a small /etc/ppp/ppp.linkup script that writes the nameserver addresses into "forwarders" entries in /etc/namedb/named.conf and restarts the named process ("/etc/rc.d/named restart"). That's it. If your ISP's nameservers never change (mine never did), you can probably also just hardcode them. :-) Another option, if you don't absolutely have to use your ISP's nameservers for some reason, then you can also just ignore them, i.e. letting your own nameserver resolve everything itself, without forwarding. (Of course that's not possible if your ISP blocks port 53.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "Python tricks" is a tough one, cuz the language is so clean. E.g., C makes an art of confusing pointers with arrays and strings, which leads to lotsa neat pointer tricks; APL mistakes everything for an array, leading to neat one-liners; and Perl confuses everything period, making each line a joyous adventure . -- Tim Peters