From owner-freebsd-questions@FreeBSD.ORG Fri Nov 1 17:31:18 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7AD4CA99 for ; Fri, 1 Nov 2013 17:31:18 +0000 (UTC) (envelope-from ulrich@pukruppa.de) Received: from pukruppa.de (pd95cabe3.dip0.t-ipconnect.de [217.92.171.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0D02A2C29 for ; Fri, 1 Nov 2013 17:31:17 +0000 (UTC) Received: from pukruppa.de (localhost [127.0.0.1]) by pukruppa.de (8.14.7/8.14.7) with ESMTP id rA1HV79W050604; Fri, 1 Nov 2013 18:31:08 +0100 (CET) (envelope-from ulrich@pukruppa.de) Message-ID: <5273E55B.3070705@pukruppa.de> Date: Fri, 01 Nov 2013 18:31:07 +0100 From: Peter Ulrich Kruppa User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Vincent Hoffman , Wei Guo , freebsd-questions@freebsd.org Subject: Re: How to set up unbound on FreeBSD 10 References: <5270C384.9040502@pukruppa.de> <5270DDC0.2050603@gmail.com> <5270FCF2.1030209@pukruppa.de> <52738340.4050705@unsane.co.uk> In-Reply-To: <52738340.4050705@unsane.co.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Nov 2013 17:31:18 -0000 On 11/01/13 11:32, Vincent Hoffman wrote: > On 30/10/2013 12:34, Peter Ulrich Kruppa wrote: >> >> On 10/30/13 11:21, Wei Guo wrote: >>> 于 10/30/13, 4:29 PM, Peter Ulrich Kruppa 写道: >>>> Hi, >>>> >>>> as I can see there is a new default dns server shipping with FreeBSD 10: >>>> unbound. >>>> >>>> When I try to set it up as described in >>>> >>>> http://blog.des.no/2013/09/local-caching-resolver-in-freebsd-10/ >>>> >>>> by typing >>>> >>>> # echo local_unbound_enable=yes >>/etc/rc.conf >>>> # service local_unbound start >>>> >>>> I am locked out of my internet connection and nobody is served any dns . >>>> So I guess something must be missing. >>>> For example: Do I have to mount any devfs ? >>> I guess you must have the following line in your ppp.conf: >>> >>> disable dns >>> >>> in order to stop ppp(8) from rewriting your /etc/resolv.conf. And you >>> to can edit /var/unbound/forward.conf and /var/unbound/unbound.conf >>> to meet your demands. >> Thanks, that is a good hint - but it doesn't solve the problem. >> As soon as I activate unbound I no dns requests from my machine (neither >> from any other) will be answered. > Hi, > I Just tested this on a 10.0-BETA1 machine and am not having any issues. > after starting local_unbound, whats the contents of your > /etc/resolv.conf and the output of sockstat -4 | grep unbound ? for > reverence mine is: > root@bsdpkgbuild:~ # cat /etc/resolv.conf > search mydomain.net > # nameserver 192.168.11.1 > # nameserver 192.168.11.2 > nameserver 127.0.0.1 > options edns0 > root@bsdpkgbuild:~ # sockstat -4 | grep unbound > unbound unbound 11042 6 udp4 127.0.0.1:53 *:* > unbound unbound 11042 7 tcp4 127.0.0.1:53 *:* Hello everybody, it seems I have found the way to work my setup: My /etc/resolv.conf must not be changed by unbound. I.e. After starting local_unbound I remove the lines nameserver 127.0.0.1 and options edns0 and uncomment the nameserver entries created by ppp. nameserver 217.237.151.51 nameserver 217.237.149.205 My /var/unbound/forward.conf I leave as it was generated: forward-zone: name: . forward-addr: 217.237.151.51 forward-addr: 217.237.149.205 and in my /var/unbound/unbound.conf I add some lines server: username: unbound directory: /var/unbound chroot: /var/unbound pidfile: /var/run/local_unbound.pid auto-trust-anchor-file: /var/unbound/root.key interface: 127.0.0.1 interface: 192.168.10.1 access-control: 127.0.0.0/8 allow access-control: 192.168.10.0/16 allow_snoop include: /var/unbound/forward.conf sockstat now gives me four lines: unbound unbound 50518 3 udp4 127.0.0.1:53 *:* unbound unbound 50518 4 tcp4 127.0.0.1:53 *:* unbound unbound 50518 5 udp4 192.168.10.1:53 *:* unbound unbound 50518 6 tcp4 192.168.10.1:53 *:* Thanks for your help and support! Greetings Peter > Vince > >> Greetings >> >> Peter >>> >>>> My machine has got two nics: one unconfigured to dial in to an ADSL >>>> connection via DSL bridge and one with IP 192.168.10.1 to my LAN. >>>> >>>> With old named/bind all I need to set is >>>> >>>> named_enable="YES" >>>> in /etc/rc.conf and >>>> >>>> listen-on { 127.0.0.1; >>>> 192.168.10.1;}; >>>> in /var/named/etc/namedb/named.conf >>>> >>>> >>>> >>>> Thanks for your help >>>> >>>> Peter >>>> _______________________________________________ >>>> freebsd-questions@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >>>> To unsubscribe, send any mail to >>>> "freebsd-questions-unsubscribe@freebsd.org" >>> >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >> > >