From owner-freebsd-questions Sun Apr 21 15:20:45 2002 Delivered-To: freebsd-questions@freebsd.org Received: from axel.truedestiny.net (a185066.upc-a.chello.nl [62.163.185.66]) by hub.freebsd.org (Postfix) with ESMTP id D43E537B41A for ; Sun, 21 Apr 2002 15:16:38 -0700 (PDT) Received: by axel.truedestiny.net (Postfix, from userid 1000) id 2CC0949AB2; Mon, 22 Apr 2002 00:16:37 +0200 (CEST) Date: Mon, 22 Apr 2002 00:16:37 +0200 From: Axel Scheepers To: Zhifu Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Problem: dynamic IP static hostname Message-ID: <20020422001636.J82499@mars.thuis> Reply-To: Axel Scheepers References: <1019421672.3cc323e875c30@flounder.singnet.com.sg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1019421672.3cc323e875c30@flounder.singnet.com.sg>; from limdorj@singnet.com.sg on Mon, Apr 22, 2002 at 04:41:12AM +0800 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 On Mon, Apr 22, 2002 at 04:41:12AM +0800, Zhifu wrote: > Hi, I am new to BSD environment. how do you subscribe/reply to the mailing list of freebsd-question? Hi, From the email headers: List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: + List-Unsubscribe: + see the list help for all the list commands. > > Specifically to my problem, I am asked to setup a BSD box which can plug into any network point that assigns the box a dynamic IP address. The box will act as a webserver to serve out intranet application as well as FTP server. I face the following problems: > 1) How to configure /etc/hosts to map the dynamic IP to the hostname. You could create a script which gets called from rc.local to do that: #!/bin/sh ip=`ifconfig ed1 | grep inet | grep -v inet6 | awk '{print $2}'` echo "$ip hostname hostname.domain" > /etc/hosts > 2) I am unable to PING from other Windows > terminal but i can do PING That ping does a lot more then just ping; first it looks up hostname (resolves to an ip), which seems to go wrong. Either add the dns entry to the different dns servers / client hosts files or try to configure dynamic dns updates (don't ask me ;) > 3) What should I put in /etc/rc.conf for hostname= Whatever name you like. > I need the hostname in order to serve let other users access the box but I cannot use redirectional services from the internet or ask the network admin to assign me a specific address. I need to come up with a plug and play box. Hmm that sucks.. There is something about dynamic dns updates using dhcp, if the dhcpd servers you talk to understand that, you can send your hostname to the dhcp server. (At least I thought it worked like that, I never tried it) > > Thank you in advance. > Gr, -- Axel Scheepers UNIX System Administrator email: axel@axel.truedestiny.net a.scheepers@iae.nl http://axel.truedestiny.net/~axel ------------------------------------------ Liberty is always dangerous, but it is the safest thing we have. -- Harry Emerson Fosdick ------------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message