LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-09-2012, 09:21 AM   #1
dassio
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
linode ping returned hostname


i have an linode VPS server, when i do a ping command it returns the ugly linode hostname, how can i make the ping return my changed hostname like this site:greyhat-security.com?
 
Old 08-09-2012, 09:44 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790
The first question is from where are you doing the ping? It is on this system you'd need to address the answer.
The second question would be where is the name coming from? You'd examine the below for that.

When you run commands for networking they typically interrogate /etc/nsswitch.conf for "hosts" line to see where to get the name. Often that will show something files first then dns second (and maybe nis or other things).

If you have access to the resolver (e.g. DNS BIND) the best place would be to change it there. Since this is a cloud based system I'm not sure if they give you that level of access. If not it may be a request you can make of the Linode folks. Failing that you could update /etc/hosts and so long as "files" is first in nsswitch.conf it will read the name from hosts before it does from whatever follows.

Note that commands such as "dig", "nslookup" and "host" are designed to read the name server so will ignore /etc/hosts when replying but most other commands will honor nsswitch.conf including ping.
 
Old 08-09-2012, 11:35 AM   #3
elyask87
LQ Newbie
 
Registered: Nov 2006
Location: Bahrain
Distribution: Linux Mint
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by dassio View Post
i have an linode VPS server, when i do a ping command it returns the ugly linode hostname, how can i make the ping return my changed hostname like this site:greyhat-security.com?
I believe the ugly Linode hostname you mention is the rDNS hostname set within your Linode manager. Log in to your manager, choose the Linode's dashboard and check the "Remote Access" tab. If you find the ugly Linode hostname in the "Public IPs" section, you may change it by clicking on the "Reverse DNS" link and set to anything you want.
 
  


Reply

Tags
hostname


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FC13 install can ping by hostname, ssh by hostname fails jeffk42 Linux - Networking 4 11-14-2011 12:27 PM
BIND9 SLOW ping when ping by hostname dschuett Linux - Networking 10 02-02-2011 05:17 PM
hostname command returned (none) sigmacunfu Linux - Newbie 5 09-26-2006 12:18 AM
can ping ip but not hostname mrbabis Linux - Networking 17 06-07-2006 01:26 PM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 05:57 AM


All times are GMT -5. The time now is 11:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration