How to check your server without DNS

You may want to test a domain or website that you have setup in Sentora without having any nameserver pointing on it.

Solution : setup the hosts file of the computer used to browse the domain as following:

 

With Ubuntu or CentOs:

Your hosts file is  /etc/hosts

Use the same explanations as above for windows.

Note for local server:

If your server is installed on the same local network that the computer used to browse it (ie : another computer at home), you have to use its local IP in the hosts file (often like 192.168.xx.xx).
If the server is on the same computer which is used to browse, use IP 127.0.0.1 (local loop)

Remember that a computer can NEVER reach a server which is on the same side of a router with its external IP. It induces you cannot use a public nameserver to reach such server because the nameserver will always return the external IP.
In such case, the only solution to test a public DNS is to use a public proxy that will relay all requests, from outside.

Warnings:

Do not forget to remove the line from hosts file when you are terminated ! Else you browser would never use the DNS that would remain bypassed !

 

PenWant to help ? Click here to report mistake or to send complement to add.