Cant make hostname resolvable

Issues related to configuring your network
Post Reply
plengyel
Posts: 1
Joined: 2018/11/16 23:42:19

Cant make hostname resolvable

Post by plengyel » 2018/11/16 23:47:02

Hello,
I am currently trying to create a fqdn on a centos minimal install. I have set the hostname using hostnamectl and have added the fqdn to the /etc/hosts file. However, when i try to use nslookup or try and ping the fqdn on my windows 10 laptop I do not get a response. When I ping the ip address I do get a response. I set the DNS server to my router (192.168.1.1) and my router is using my ISP's DNS server. Can anybody help me make my fqdn resolvable on my local network?
Thank you,
Philip

User avatar
TrevorH
Forum Moderator
Posts: 24064
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cant make hostname resolvable

Post by TrevorH » 2018/11/17 10:19:14

Yeah, that's not how it works. For a start nslookup doesn't look at /etc/hosts at all. Second, /etc/hosts is only consulted on the machine where it resides - it's not a DNS server. You need to add the entry to the Windows system's equivalent of /etc/hosts.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

lightman47
Posts: 767
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Cant make hostname resolvable

Post by lightman47 » 2018/11/17 13:08:21

In mine, it's conveniently placed in \Windows\System32\drivers\etc

heh
"The more I learn, the behinder I get"

Post Reply