2

I'm having name server resolution problems on one of my machines in my network, but I can still ping 1.1.1.1 and I get a reply, so there is no Internet problem, just a DNS problem.

Can I still search the Stack Exchange network to look for solutions to my problem from the machine I'm having the problem on?

(Because I can't copy-paste from the machine that works to the machine that doesn't work)

1 Answer 1

2

Yes, you can! :-)

On *nix:

  • Open a terminal and type:

    sudo vi /etc/hosts
    
  • Navigate to the bottom of the file and press i

On Windows:

For both *nix and Windows:

Add the following entries to the bottom of the file:

151.101.1.69    askubuntu.com
198.252.206.29  chat.stackexchange.com
151.101.1.69    linux.stackexchange.com
198.252.206.16  sstatic.net
185.53.179.7    stackexchange.com
151.101.65.69   stackoverflow.com
151.101.193.69  superuser.com
172.217.22.14   www.google.com

(The above are in alphabetical order, but they don't need to be...)

On *nix:

  • Hit Esc:wqEnter

In Windows:

  • Close Notepad
  • Click Yes when Notepad asks you to save the file

Done! You can use now use google to search and read the questions and answer you so desperately need on the Stack Exchange Network.

Warning:

Once DNS starts working again, take those entries out of your hosts file or you'll run into problems when the SE Engineers will perform their next DR Test...

Tip: Save this page off-line so you already have it when you need it most. :-)

Pro Tip: Add the above entries to your hosts file already right now and precede every line with # and remove the # when you need this solution.
No! Don't add them without preceding them with # in the unlikely case you might run into DNS problems as most of the above servers have multiple IP addresses assigned and load balancing on the SE network will stop working! This is a pro tip: don't do it if you don't know what the implications are! :-( Use the normal tip instead!

3
  • And several weeks later you'll have more problems, when the sites' actual IP addresses change and you've forgotten to remove the static entries. Apr 18, 2018 at 20:31
  • @grawity: Answer updated! Thanks for the tip!
    – Fabby
    Apr 18, 2018 at 20:38
  • @Ramhound I'm not talking about changing DNS providers: I'm talking about having DNS problems related to the configuration of the machine... Neither ISP, Cloudflare nor Google were working: what do you do then? (it was like UDP Port 53 being blocked)
    – Fabby
    Apr 18, 2018 at 22:08

You must log in to answer this question.

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