FreePBX Firewall not working with FQDNs

So, I’m running into a bit of a problem here. I need to add someone to the “trusted” zone on several FreePBX servers, but due to circumstances beyond my control, will have to utilize dynamic DNS to make this happen (I know, I know…)

That said, I’ve added hosts using FQDN before and it’s worked. However, today I added this one using “fwconsole firewall add trusted” (of course replacing with the actual FQDN.) It reports success, you can see it’s been added in the FreePBX GUI, etc.

However, when you look at the iptables rules on the PBX, the IP for that name is not there. I’ve waited over an hour, and still nothing.

This is happening on several FreePBX 14 boxen (which are up-to-date.) I also have a FreePBX 15 server as my personal PBX and doing this same process yields the expected result (the appropriate IP is resolved and added to iptables.)

Is there some process/switch/etc. that can be flipped on/off to enable/disable these FQDN lookups? I’m not seeing any in documentation, but it’s odd that it’s happening across multiple FreePBX 14 machines. Just wanting to make sure I’m not overlooking something obvious here.

Any ideas would be appreciated. :slight_smile:

Well there is going to be one issue with this. iptables doesn’t do recurring lookups on DNS, it looks up the FQDN when started and that’s that. So this will not work as a DynDNS solution like you think because when a DynDNS record is updated, the firewall will never know and the previous IP will still be used until you restart the firewall.

1 Like

No it does not, but the FreePBX firewall module does, which is what he is using.

Well apparently not based on this thread. So any thoughts for them?

Upgrade to 15.

I don’t have a 14 system at hand, but testing with firewall module ver. 15.0.26 I’m unable to repro this. Are you using the CLI to add the fqdn to the trusted list, because there may be a bug there FREEPBX-18511. It takes a few minutes for the rule to be added after adding the fqdn to the networks list.

I am facing the same issue your post is helpful to me thanks.

1 Like

Is it the same? Are you on FreePBX 14? Which version of the modules?

Not exactly.

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