Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2002 00:16:37 +0200
From:      Axel Scheepers <axel@axel.truedestiny.net>
To:        Zhifu <limdorj@singnet.com.sg>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Problem: dynamic IP static hostname
Message-ID:  <20020422001636.J82499@mars.thuis>
In-Reply-To: <1019421672.3cc323e875c30@flounder.singnet.com.sg>; from limdorj@singnet.com.sg on Mon, Apr 22, 2002 at 04:41:12AM %2B0800
References:  <1019421672.3cc323e875c30@flounder.singnet.com.sg>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <freebsd-questions.FreeBSD.ORG>
List-Archive: <http://docs.freebsd.org/mail/>; (Web Archive)
List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-Subscribe:
+<mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-questions>
List-Unsubscribe:
+<mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-questions>

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 <HOSTNAME> from other Windows 
> terminal but i can do PING <IP ADDRESS>
That ping <hostname> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020422001636.J82499>