From owner-freebsd-questions Fri Dec 13 11:26:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFCCC37B401 for ; Fri, 13 Dec 2002 11:26:33 -0800 (PST) Received: from c3po.artlogix.com (s01.artlogix.com [216.231.46.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id D460843ED4 for ; Fri, 13 Dec 2002 11:25:28 -0800 (PST) (envelope-from mcglk@artlogix.com) Received: from ralf.artlogix.com.artlogix.com (unknown [192.168.0.3]) by c3po.artlogix.com (Postfix) with ESMTP id 3EC281A9CC; Wed, 11 Dec 2002 23:52:00 -0800 (PST) To: Bsd Neophyte Cc: freebsd-questions@FreeBSD.ORG Subject: Re: hosting more than one website on a cable connection (DHCP)... and using BIND References: <20021212072707.58724.qmail@web20109.mail.yahoo.com> From: Ken McGlothlen Date: 11 Dec 2002 23:55:09 -0800 In-Reply-To: <20021212072707.58724.qmail@web20109.mail.yahoo.com> Message-ID: <86k7ifllia.fsf@ralf.artlogix.com> Lines: 102 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bsd Neophyte writes: | I have a cable connection that uses DHCP, giving me a lease for about 2 | minutes. Usually the address stays the same, but at times it does change. | | I want to host two domain names to start. I also would like to have the | possiblity to host more. I will have only one changing IP. Well, okay. The trick (as you already know) is to have whatever is hosting your DNS entries to automatically update. You'll want to investigate at http://www.dyndns.org/ to see which services are right for you. This is probably the easiest way to handle dynamic IP DNS. | I also want to have subdomains. I want each system at home to have a | subdomain based on either one of the two domain's I'll have established. So | if I have blah.com as my primary domain, I want to be able to ssh to | yadda.blah.com from any other location. If I want to ssh to yawn.blah.com | from any other location, it should be able to connect to that system, | eventhough they are both sharing 1 ip address through Natting. Uh . . . okay. That's . . . trickier. Having subdomains for your webservices is easily done. You can set up virtual webservers in Apache all day on the same box, and go nuts with it. The reason it works is because they're all sitting at the same port on the same machine, and Apache is sensitive to what domain name was used to access it. ssh, on the other hand, isn't. If yadda and yawn are separate machines, and they're sitting behind a firewall, and you want to get to them via SSH, you're going to have to have separate ports on the firewall which will redirect to port 22 on the target boxes. Make sense? | I've been told I can use these free third party domain name servers. I've | also been told that you need to keep a record with at least 2 domain name | servers when hosting a domain name. I suspect that dyndns.org has backup DNS already. :) In general, though, having a DNS server behind a dynamic IP is . . . pointless. Having an internal DNS for your own firewalled network makes perfect sense, but you can't expect to have the outside world use it. | Now, I'm completely confused if this can be done and if it can, then how | to do it. This can be done. How . . . well, start with dyndns.org; you'll have to handle that bit first. The rest is just ipfw/natd (or ipfilter/ipnat), Apache, and a few other tidbits. | The FreeBSD handbook seems pretty straight-forward in setting up BIND. | However, I don't know how to distinguish more than one domain name when | using only one IP address. Separate zone files. One might be $TTL 1D @ IN SOA dnsi.blah.com. hostmaster.blah.com ( 2002120501 ; serial 8H ; 2ndary chk 2H ; retry 1W ; discard 1W ; RR TTL ) A 192.168.0.2 MX 10 mx.blah.com. MX 20 mx.offsitebackupmx.com. mx A 192.168.0.2 yadda A 192.168.0.2 yawn A 192.168.0.2 www CNAME yadda dnsi CNAME yawn and another would be $TTL 1D @ IN SOA dnsi.feh.com. hostmaster.feh.com ( 2002120501 ; serial 8H ; 2ndary chk 2H ; retry 1W ; discard 1W ; RR TTL ) A 192.168.0.2 MX 10 mx.feh.com. MX 20 mx.offsitebackupmx.com. mx A 192.168.0.2 scratch A 192.168.0.2 belch A 192.168.0.2 www CNAME scratch dnsi CNAME belch All the names just point to the same place in this case. | Also, is it possible for the home DNS and the third party DNS's to work in | tandem? Probably not in the way you're expecting. With dynamic DNS, you're pretty much going to be dependent on external services for others trying to reach your site. When you get a static IP, you can pretty much do whatever you need. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message