Sunday, 14 August 2011

Getting around DNS

This is an old post pulled from another site (for preservation)

Jotting this down really, because it is the type of related problem that crops up every now and again and sometimes if my brain is not firing on all cylinders I get stumped for a while.

The problem

Really wanted to check out an open-source project NOW yet svn checkout couldn't resolve the host for the repository. My PC can't find the DNS, other PCs on our network can't find it, it was there yesterday (or rather it was there for me at home).

The solution

First checked that the site was available for some people by checking on apparently it is just me (and a few others I guess). Next I need an IP address so searched in Google for sites that give IP address if you know the DNS (because I can't do this for myself right now), first one couldn't find it (down for them also it seems), the second one gave me an IP address(phew) Next problem is that the IP address just takes me to the server for their hosting company, so I need to add an entry in my own hosts file (/etc/hosts) on my Linux system and another entry for the svn. address I was originally trying to use there. Bingo now my PC knows how to find their server and make the request in a way that takes me to the pages and data I want (using the expected host). In the past have also resorted to trying different DNS servers (opendns or googledns) Additional later note: and of course I could always get a command-line on a remote server somewhere (we have a client server in Hong Kong for example) and use that location to do my investigation from.

No comments: