3

I edited the hosts file and added:

10.0.0.1 devsys.crossreader.net

Later I commented out the entry:

#10.0.0.1 devsys.crossreader.net

When I ping or browse to devsys.crossreader.net the returning IP is still 10.0.0.1. I tried to flush the dnscache, and even rebooted but that didn't work. Why does this happens?


here is the entire hosts file

###############
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
#10.0.0.1 devsys.crossreader.net
2
  • this is my hosts file imgur.com/R0Xcl And this is what happen when i ping to devsys.crossreader.net imgur.com/JBA7u
    – navot volk
    Oct 9, 2011 at 15:53
  • What happens if you enter host devsys.crossreader.net in Terminal? What about dig devsys.crossreader.net? Oct 10, 2011 at 14:55

2 Answers 2

1

Since your /etc/hosts is not the problem, the logical conclusion is that your DNS server is responding with that IP address, or you aren't using the DNS server you expect. To verify this, paste this into Terminal.app:

host -a devsys.crossreader.net

Terminal screenshot with results of above command

0

The hosts file deals with each entry as it comes. For example:

127.0.0.1 www.apple.com
#127.0.0.1 www.apple.com

Will point your computer to 127.0.0.1 when you connect to apple.com.

You will need to comment out the one single line to stop the redirect. For example:

#127.0.0.1 www.apple.com

Will point your computer to Apple's servers. After making the changes, you can run the following to clear out your DNS cache:

dscacheutil -flushcache
8
  • @chsum: If I read the question correctly, the line is commented out but still gets the wrong IP.
    – nohillside
    Oct 9, 2011 at 11:24
  • I got that too re-reading the question (and edited the original post to be clearer). I would actually like to see the entire hosts file and also the command he used to "clear" it.
    – user10355
    Oct 9, 2011 at 11:28
  • this is my hosts file imgur.com/R0Xcl
    – navot volk
    Oct 10, 2011 at 6:57
  • @navotvolk I've verified adding and uncommenting entries in the hosts file. It works without a need to clear your DNS cache. Adding a comment should restore the default IP instantly (upon save). When you edit the file, you are using sudo (e.g., sudo nano /etc/hosts), correct? I can't see anything else that would interfere with it not working. Perhaps a good lesson to not mess with your network (or files in etc) unless you absolutely know what you are doing ;)
    – user10355
    Oct 10, 2011 at 7:15
  • @cksum i did it a lot and everything went well. is there a chance that it stuck some where else in the DNS? i edit it with sudo etc/hosts and still no luck
    – navot volk
    Oct 10, 2011 at 7:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .