system is not setup to use itself as a DNS server. Either add to the list of DNS servers

I am quite frankly sick of this problem and it keeps popping up whenever i least expect it when setting up a new machine. I cannot for the life of me remember how to fix it when i wish to run bind dns and use the system as a nameserver.

My Microsoft Azure Virtual Machine is running a static ip address

google drive image of the problem spot here…

Is the following solution good enough…

  1. login to ssh command prompt via putty (or through virtualmin interface directly)
  2. sudo su
  3. now as root user edit nano /etc/rc.local
  4. add the following line into rc.local just before the line “exit 0” echo nameserver >> /etc/resolv.conf

is this an ok solution?

+1 for this question. I would like to know that too.

hi, I had same problem on my debian box which turned to be simple - I had no static ip setup on that server, basically I setup static ip on router but not on server. As I configured static ip to be asked from router on box rather then assign static ip to the box from router this problem went away. also you can add this into your system…