Is dnsmgr working as expected?

FreePBX does add the current hostname to the hosts file.

Changed hostname in freepbx and so get changed the /etc/hosts file.

Confirmed, I’m wrong (not for the first time today)

Then properly configure your dns and border firewall so the “hacks” are not needed. Not much more than checking a box with some firewalls.

I’m puzzled. The original problem was that setting the hostname to my FQDN in freepbx for letsencrypt certificate creation/updating brokes the functioning of dnsmgr and functioning of my pbx behind a NAT router.

It’s not necessary to set the hostname for a successful LE renewal, provided the PBX is able to resolve the fqdn and access the token from itself using the resolved IP. If your router is blocking this, the common work around you see here in the forum is to set the hostname to prevent the request from going out to the internet and back in again.

My router (pfsense) does not block anything on the lan side. Maybe the problem is that my WAN IP address is just my FQDN and that I have set NAT reflection to be able to use the Zoiper softphone on my iPhone that moves back and forth between my lan and the 3G / 4G network?

NAT Reflection/NAT Loopback is generally the solution, not the cause, of the problem, but you can see we are now in a pfsense/firewalling discussion, not a FreePBX discussion.

In fact, I think so too … but at this point I’m starting to melt :sweat_smile:
… In any case, I remain convinced that freepbx should not change the /etc/hosts file when it change the hostname.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.