LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 11-28-2018, 06:32 AM   #16
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896

Depends on the distribution, what services are running and how it is configured. You might be getting hostname resolution on the server using Avahi but I am only guessing.
 
Old 11-28-2018, 06:32 AM   #17
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by hack3rcon View Post
But from the server I can ping other computers by their names!!!
For example, I did "ping client1" from server itself:
Code:
$ ping client1
PING client1.mydomain.com (X.X.X.X) 56(84) bytes of data.
64 bytes from X.X.X.X (X.X.X.X): icmp_seq=1 ttl=128 time=0.456 ms
64 bytes from X.X.X.X (X.X.X.X): icmp_seq=2 ttl=128 time=0.196 ms
Check the other machine. Check name resolution for client1 from myserver
Code:
grep -i client1 /etc/hosts;cat /etc/resolv.conf
looking for either client1 in the hosts file OR a nameserver defined on this network. Something allows the resolution of client1 on myserver, so if we replicate that for myserver it should help. If it is the hosts file, we just need to replicate the proper line for myserver (NOT 127.0.0.1, that is loopback) or an entry on the nameserver for myserver. In both cases use the correct network interface address for myserver, not the loopback address.

If your nameserver is running DHCP and using the host name, it may already have an entry for your "myserver" under an earlier name. If that is the case I would check to see if that old name resolves. The solution may be as simple as turning myserver off and waiting out the lease time.
 
Old 11-28-2018, 06:42 AM   #18
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by wpeckham View Post
Check the other machine. Check name resolution for client1 from myserver
Code:
grep -i client1 /etc/hosts;cat /etc/resolv.conf
looking for either client1 in the hosts file OR a nameserver defined on this network. Something allows the resolution of client1 on myserver, so if we replicate that for myserver it should help. If it is the hosts file, we just need to replicate the proper line for myserver (NOT 127.0.0.1, that is loopback) or an entry on the nameserver for myserver. In both cases use the correct network interface address for myserver, not the loopback address.

If your nameserver is running DHCP and using the host name, it may already have an entry for your "myserver" under an earlier name. If that is the case I would check to see if that old name resolves. The solution may be as simple as turning myserver off and waiting out the lease time.
I did:
Code:
# Generated by NetworkManager
search mydomain.com
nameserver 172.20.1.2
nameserver 172.20.2.7
 
Old 11-29-2018, 05:46 AM   #19
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,627

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by hack3rcon View Post
I did:
Code:
# Generated by NetworkManager
search mydomain.com
nameserver 172.20.1.2
nameserver 172.20.2.7
That indicates that the node at 172.20.1.2 is resolving names for you. Is that host on your network, or is that under control of your ISP?
If it is under your control, that is where we would add your myserver host DNS entry.

Although, if it is under your control and you do not have the knowledge needed to manage it, you might be better just adding the myserver line to all available hosts files. That is far less technical a solution.
 
  


Reply



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
[SOLVED] Server can ping clients, but clients cannot ping server and i cannot SSH into Server jzakharia Linux - Networking 5 07-05-2015 02:21 PM
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
I cannot ping with command 'ping IP' address but can ping with 'ping IP -I eth0' sanketmlad Linux - Networking 2 07-15-2011 05:32 AM
Ping PING Ping uid0sd Linux - Networking 1 02-13-2007 06:50 PM
hosting and ping samba server name as well as mail server name simultaneously cbekannan Linux - General 2 01-11-2005 12:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:07 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration