assign hostname
I've installed a new copy of Ubuntu 10.10.Now the big question for me is how do we assign hostname to a given ip?
I've given the hostname during the server installation and "cat hosts" says "ebox" hostname I'm trying to put on.Also,I modified the network/interfaces to static and assigned proper values. #hostname returns ipaddr not the hostname. Also nslookup hostname/ipaddr says server can't find .... So,is installing dns through bind and setting-up the only way to do that? Any suggestions? Thanks |
To which IP?
You can add in /etc/hosts Code:
127.0.0.1 localhost |
I've an entry in /etc/hosts
like 127.0.0.1 localhost 127.0.1.1 ebox.mydomain.com ebox do I replace 127.0.1.1 ebox.mydomain.com ebox with 10.0.0.44 ebox.mydomain.com ebox Thanks |
Quote:
Code:
127.0.1.1 ebox.mydomain.com ebox Kind regards |
#hostname now returns "ebox" but nslookup still says "server can't find ebox".
What could be the problem regards |
Did you configured a DNS entry for ebox?
What do you want to achieve? If you use Code:
ping ebox Kind regards |
to my knowledge I'm sure of the dns entries in resolv.conf
ping ebox from outside hosts says unknown host;ping ebox from localmachine gives the correct ipaddr and finally ping ipaddr reply back too Regards Andrew |
Quote:
Just add the ip and name in /etc/resolv.conf from the outside host. If you mean from outside the network, via the internet, you need to register your domain, and create a DNS entry. /etc/resolv.conf is not DNS, ping etc first look in this file, if they find it, they will use it, else they will use global DNS Kind regards |
I'm sorry but is it just "nameserver ip" (or) "ebox ip" in the other /etc/resolv.conf. And when I mean hosts,it means any terminal in the network,via the internet. Sorry if this confused you. Domain is already registered and has a DNS entry
|
Quote:
Quote:
If not, the name will resolve to the public ip from the router. If you want to use nslookup, you need to give the whole domainname mydomain.com If this doesn't work, it's possible DNS isn't propagated yet. Kind regards |
All times are GMT -5. The time now is 11:46 PM. |