Is it ok to remove 127.0.0.1 from /etc/resolv.conf

5 posts / 0 new
Last post
#1 Sat, 06/20/2015 - 09:38
Brook

Is it ok to remove 127.0.0.1 from /etc/resolv.conf

I am having problems with my docker container which keeps losing connection to the internet - and it is suggested to edit /etc/resolv.conf from the host in order to use external dns.

Currently my resolv.conf reads:

nameserver 127.0.0.1
nameserver 213.133.98.98
nameserver 213.133.99.99
nameserver 213.133.100.100
nameserver 2a01:4f8:0:a0a1::add:1010
nameserver 2a01:4f8:0:a111::add:9898
nameserver 2a01:4f8:0:a102::add:9999

Is it safe for me to remove the first line? Will removing it cause anything to break? (I guess the other nameserver entries were added by my dedicated server provider.)

Sat, 06/20/2015 - 13:53
Diabolico
Diabolico's picture

Keep first line you need it, but you can add google dns: 8.8.8.8 and 8.8.4.4.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Sat, 07/04/2015 - 14:39
Brook

Thanks Diabolico - apologies for not coming back sooner to say thanks!

I did try this, but unfortunately it didn't help the Docker issue - which seems to be related to the CSF firewall I am running. (Docker adds some rules then CSF seems to wipe them periodically).

Sat, 07/04/2015 - 14:39
Brook

Thanks Diabolico - apologies for not coming back sooner to say thanks!

I did try this, but unfortunately it didn't help the Docker issue - which seems to be related to the CSF firewall I am running. (Docker adds some rules then CSF seems to wipe them periodically).

Sat, 07/04/2015 - 18:11
Diabolico
Diabolico's picture

Never used CSF but what i know it should be a software for advanced firewall management plus some extra on top of that. Not sure if you really need CSF but you could try to disable/remove and go back to classic iptables and for security use fail2ban. If your firewall still gets changed it could be that your host provider is doing this, e.g. changing the rules after each server restart.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Topic locked