3

I am not running DNS server on my Debian machine. However, file resolv.conf contains the following lines:

nameserver 127.0.0.1
nameserver 213.186.33.99
search ovh.net

Is it normal to have line nameserver 127.0.0.1 in this file. If not, can I just edit this file and remove it?

I uninstalled bind9.

I have other severs @server4you and never Bind9 was installed by default and resolv.conf does not contain line nameserver 127.0.0.1. I just got a new server @ovh with installed Bind9 which I have uninstalled.

tfegc
  • 221
  • 1
  • 5
  • 10

2 Answers2

2

It is normal and strongly recommended if you are running a DNS server on the local host like Bind/DNSMasq, etc. You usually should point to your DNS server only, and configure any forwards you require within the DNS server.

Zoredache
  • 130,897
  • 41
  • 276
  • 420
1

Are you sure you're not running a name server? You'll likely find dnsmaq running

netstat -tunlp | grep :53
user9517
  • 115,471
  • 20
  • 215
  • 297
  • I uninstalled bind9. That's why I ask if this line `nameserver 127.0.0.1` is OK – tfegc Oct 09 '14 at 17:36
  • 1
    If you don't have a local DNS server running on that system, then remove that line. – Zoredache Oct 09 '14 at 17:41
  • 1
    @tfegc Ah right important information that should have been in your question. If you have no DNS server listening 127.0.0.1:53 then there is no need for the line. – user9517 Oct 09 '14 at 17:45
  • 1
    When removing nameserver 127.0.0.1 from `etc/resolv.conf` it gets added again with `resolvconf -u`. How can I remove it permanent? – Timo May 04 '22 at 10:44