From owner-freebsd-questions@FreeBSD.ORG Sun Jan 1 23:45:15 2012 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 54C4A106566C for ; Sun, 1 Jan 2012 23:45:15 +0000 (UTC) (envelope-from roquesor@gmail.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id D794A8FC0A for ; Sun, 1 Jan 2012 23:45:14 +0000 (UTC) Received: by wibhr1 with SMTP id hr1so14594430wib.13 for ; Sun, 01 Jan 2012 15:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=1cAw7HGGym2rTGT2aaiZdqkP/BWhiH/9iUzA0elHJgA=; b=vFrXi4rSTHk5u+ce1ijj/y0dL6SkR9bC82zvKFOT7wRaGDrK65BSCkyBGZmnm4oM56 FrLoF5qrhGpT5SCLIBBZQ/Cvr/0kfdcHbKk9EBzqIjcYmJOvuu252CY7du2wFsON2S7l BAEBfb1/Yu4uYTuF0bj2Qt32PP0DYyrhQJDLs= Received: by 10.180.75.7 with SMTP id y7mr4791486wiv.2.1325461512281; Sun, 01 Jan 2012 15:45:12 -0800 (PST) Received: from localhost ([80.31.138.65]) by mx.google.com with ESMTPS id g26sm22147640wbo.16.2012.01.01.15.45.10 (version=SSLv3 cipher=OTHER); Sun, 01 Jan 2012 15:45:11 -0800 (PST) Date: Mon, 2 Jan 2012 00:45:04 +0100 From: Walter Alejandro Iglesias To: freebsd-questions@freebsd.org Message-ID: <20120101234504.GA55393@chancha.local> References: <20120101224708.GA44456@chancha.local> <20224.58435.410063.543105@jerusalem.litteratus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20224.58435.410063.543105@jerusalem.litteratus.org> User-Agent: Mutt/1.4.2.3i Subject: Re: DNS X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2012 23:45:15 -0000 On Sun, Jan 01, 2012 at 05:54:59PM -0500, Robert Huff wrote: > > Walter Alejandro Iglesias writes: > > > Time ago I made the attempt to setup my own DNS in the same > > machine I had my web server running. DNS was the only thing I > > was not able to automatically update in the system with my > > scripts each time a new customer purchased a service. It would > > be wonderful for me if you or anyone here at least confirm me if > > it is really possible. > > What is possible - updating using scripts, or running BIND on > the same machine as a web server (presumably Apache)? > While I'm sure someone has written them, I don't know of any > scripts that will "update" (whatever that means) BIND configuration > files that are included either as part of the base system or as > ports. > However, running BIND and Apache is certainly possible - the > machine I'm typing this on does exactly that. > > > Robert Huff > I wrote a bunch of sh scripts to update sendmail, apache, add system users, etc. Those scripts were executed by cron. I wrote a simple php client panel too. So, the sh scripts read the data from mysql (I wrote those scripts originally in Slackware and more late I left unfinished its migration to freebsd) and updated the system. For updating BIND I meant that the scripts (using sed) add zones in the zone files and restart bind, in the same way they add new virtual server entries in httpd.conf and restart apache. Sure, like you say, it is possible "running" BIND and Apache. But, is it possible|convenient that the name server "reside" in the same machine that host (with apache) the domain names served by it? Perhaps you find stupid my question, but believe me, I am lost :-). Or to simplify the question, what is needed to run a DNS? What I know: Edit the zone files. Run bind. Register the names ns1.mysite.com, ns2..., (some trick here?) Obviously adding them to the registrar of the domains served. Walter