0

I have an unbuntu 9.10 server and have set the hostname to "fileserver" When I try to ping fileserver from a client machine it doesn't find it, however I can ping by the IP my router assigns it. I have tried changing the ip in /etc/hosts from this:

127.0.0.1    fileserver

to this:

192.168.1.109    fileserver

which is the ip being assigned. I had a previous install of this server and i had no issues with this - only difference in this install is i did not select any of the options such as LAMP, OpenSSH, etc during the install process. I can access the machine fine by ip using PuTTY. Any ideas?

Tone
  • 601
  • 4
  • 13
  • 29

1 Answers1

3

If it is the case that you're putting that entry in the server's hosts file: The hosts file is changed on the client side, not the server side. When a computer tries to resolve a hostname, it first checks its hosts file; if an entry is in there that matches the desired hostname, the IP of that entry is immediately returned. However, a server's hosts file does not determine the DNS lookups of any other computer; that's left for the DNS server to figure out.

Some certain environments will check the entire local IP netmask in search of a computer with a hostname that matches the requested one, but it isn't always guaranteed to work.

If the client is a Windows computer, you might have more luck if you enable the Samba service on the Ubuntu machine, and make sure that the Samba hostname is set to fileserver.

Ricket
  • 439
  • 2
  • 7
  • 18