DNS Settings lost after reboot

After reboot, the DNS settings are blank. voicemail to email not working as it can not resolve smtp server it address.

Where are you setting your DNS? it needs to be in /etc/resolv.conf


for example.

Thru the interface
Admin>System Admin>DNS

Have verified that the resolv.conf file is properly changed. When the system rebooted after an extended power outage, vmail to email no longer worked. Found DNS settings blank, both in resolv.conf and interface. Put them back in, verified resolv.conf had been changed accordingly. This is the second time in two months that the exact same problem occured, but after extended power outages.

Make sure you are using a static ip and not DHCP for your IP address, if however you are using DHCP then it will get the nameserver from the DHCP server.

Using a static IP address. And this has stayed after reboot.

Your response was unclear, if you still don’t have a valid DNS working you will have to go to the “Commercial module” support as “System Admin” is closed source and only they can help.

I don’t understand. I am using the FreePBX interface. If you open the resolv.conf file, it warns you not to edit the file as FreePBX is editing it.
Go to FreePBX and add the DNS setting through non-commercial interface. Save. After reboot the settings are gone. I had assumed this would be a FreePBX issue, based on the resolv.conf file warning etc.

I would question that warning, technically FreePBX is not editing that file because it can’t it but sysadmin (a commercially licensed, but close sourced, module which you chose to install intrinsically) is, so it should reasonably say Schmooze/Sangoma is in control of it but absolutely NOT FreePBX per se. As I said you should probably ask in the “commercial” forum here.

I have the same problem with the dns settings in sysadmin. I have not found any thread in the commercial forum.

What is the current situation?

Have decided to try and make the file resolv.conf read only. I realize that this is not really a solution, and fighting the symptom and not the problem, but it should fix my problem.

Hehe, that would work, apparently you should probably update every day because some times untested and broken software slips out.



“One of the sysadmins that was released was messed up. Including wiping out /etc/resolve.conf which is your dns resolver.”

(oops , if you where unlucky as you where , someone shot someone in the foot, you are hosed from updating anything until you manually fix that :slight_smile: maybe you should only update after Sangoma says it is stable :wink: )

But the good thing is now it has been fixed.

This did not resolve the issue either. After a reboot, same issue. Think I have a resolution though. I created a duplicate file of resolv.conf and renamed it as resolv1.conf then created a file

“copy_resolv.sh” with
"cp /etc/resolv1.conf /etc/resolv.conf".

Added this to an hourly cron job so that the most time I would be without DNS is an hour.

Maybe you should disable sysadmin until it is fully fixed.

change the cron job to

diff /etc/resolv1.conf /etc/resolv.conf || cp /etc/resolv1.conf /etc/resolv.conf

and run it every minute it should email root when it changes and reset :wink:

Disabling sysadmin had no effect. After reboot DNS settings were lost. Went ahead and re-activated the cron job.

Hi All,
I understand this is old thread but I am facing similar issue with static IP itself. So whenever I reboot my Asterisk FreePBX V, I loose IP address, though it is still available under /etc/sysconfig/network-scripts/ifcfg-eth0 file.
Next I have to restart network by “service network restart” and IP address comes back.

Can someone please help me to troubleshoot this issue.


I had a similar issue where my DNS was being overwritten after every restart with old DNS causing a failed system.

Every time I would update it via the System Admin it would update resolve.conf and it would work fine until a reboot.

I believe I finally tracked it down to being hard coded in:



See this page for details on how to config:

It sounds like you are having a slightly different problem then was described here by the original post. Perhaps a new post would be more appropriate? Have you tried using the documented method of changing your IP via System Admin?


Yup. I tried from System Admin as well. In my case, ifcfg-eth0 file has proper configuration after reboot; but somehow it does not get detected until I restart network services. So after reboot when I login thru server console, I see that there is no IP assigned to server.

I can validate, for posterity purposes, that np_pyro is correct. The sysadmin module will not do anything for the changing of the DNS. The DNS has to be managed through the interface itself. In my case, (and I assume for most), this will be the ifcfg-eth0 interface. Once you update the DNS settings there, it will be populated to /etc/resolv.conf by NetworkManager process.
Hope this helps someone else with same issue.