Entry in /etc/host file not working
6,293
All of you are absolutely correct. The ip of the server was changed. After updating the new IP , I am able to ping and connect by browser. Thank you so much .
Related videos on Youtube
Author by
Akshay
Updated on September 18, 2022Comments
-
Akshay almost 2 years
I am facing an issue when I make the entry
192.168.32.56 example.org
in /etc/hosts file ,it does not work. But when I remove it , it starts working. Below is my /etc/hosts file for Ubuntu 16 . I also changed the permissions of hosts file to 777, then also its not working. A few days back it was working but it stopped now.
# BEGIN hosts added by Network Connect 192.0.47.198 access-dc.example.org # END hosts added by Network Connect 127.0.0.1 localhost 127.0.1.1 icanw42slpc2666 # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters # LA 192.168.32.56 example.org # DC #192.168.47.56 example.org
-
Akshay over 4 yearswhen I do ping example.org it does not respond. Also when I go to browser and then type example.org , the page does not come up.
-
Stephen Kitt over 4 yearsDoes
ping 192.168.32.56
work? -
Akshay over 4 yearsPING example.org (192.168.32.56) 56(84) bytes of data. ^C --- example.icann.org ping statistics --- 253 packets transmitted, 0 received, 100% packet loss, time 258046ms
-
muru over 4 yearsSo the hosts entry is working (see it says
example.org (192.168.32.56)
). If the host on that IP doesn't respond, adding entries to/etc/hosts
isn't going to change anything. -
Akshay over 4 yearsping 192.168.32.56 does not work.
-
Stephen Kitt over 4 yearsYes, that’s what we’re saying: since you can’t reach the host, nothing in
/etc/hosts
can help you. Sinceexample.org
is being resolved to 192.168.32.56, the entry in/etc/hosts
itself is working — the only purpose of/etc/hosts
is to provide name resolution. Network connectivity is another problem. -
Akshay over 4 yearspeople on windows are able to do it.. why not from linux? Also it was working before some time for me as well on linux
-
Panki over 4 yearsThis has absolutely nothing to do with Linux or Windows. A windows system can't ping an address it can't reach either.
-
roaima over 4 yearsPut the permissions of the file back to the correct value
-