SOLVED Resolver Configuration Keeps Resetting

phillbooth

Active Member
Sep 9, 2013
41
4
8
cPanel Access Level
Root Administrator
Hello my Resolver Config keeps resetting to nameserver 169.254.169.254

I have tried changing this in Networking Setup »Resolver Configuration and /etc/resolv.conf

This server is with Google Cloud that I have only just setup a few days ago, also what might be related is that my server name is resetting as well as GC does now allow . in hostnames so
server1.myserver.com keeps becoming server1myservercom this is a liveable issue, but the resolver issue is stopping outgoing emails from connecting to their destination so I need to sort this out.

I have another server with a different provider that is just fine and my Resolver Config just stay to what I put them to

Primary Resolver 8.8.8.8
Secondary Resolver 8.8.4.4
 

anushkumar

Well-Known Member
May 14, 2005
57
1
158
cPanel Access Level
Root Administrator

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello,

Per the previous post, the following quote from that page applies here:

  • Manually editing resolv.conf will result in it being reverted to the default DHCP every time your instance's 24-hour DHCP lease expires. To, make static modifications your your instance's resolv.conf, many flavors of Linux allow items to be prepended or appended to the DHCP policy. For example, dhclient.conf provides this functionality in Debian.
There's a thread here you may find helpful when working around this issue:

Google Groups

Thank you.
 

phillbooth

Active Member
Sep 9, 2013
41
4
8
cPanel Access Level
Root Administrator
Hi, I solved the problem by doing this..

Making the /etc/resolv.conf Immutable (unwritable)
Once you are satisfied that you have set the DNS nameservers you'd like to use for host to ip resolution, you can now safely make the file unwritable, to prevent nova-agent automation from changing it on reboots. This should not affect your regular networking configuration, and only affects DNS resolution.

chattr +i /etc/resolv.conf

To remove the immutable file at any point later on you can do:

chattr -i /etc/resolv.conf



However, I am/was trying Google Cloud / Compute out for suitability, because there are a number of issues such as resolv.conf, server names not allowed as a valid domain ie server1.example.com has to be server1examplecom and most of importantly of all, no out-going emails are allowed yes 25, 587 etc are blocked for Apps so I would not be able to run an email server or get notifications Sending Email from an Instance  |  Compute Engine Documentation  |  Google Cloud Platform

So at this time, because I want an out of the box solution (even they have given me free $300 spending for 2 months) Google Compute service is not for me.

Thanks for everyone's help.
 
  • Like
Reactions: luxmicro