My (Asterisk?) service stopped working

Woke up this morning and my test PBX service doesn’t work. I have not changed anything overnight. Vanilla v16 w Sys Pro and CRM commercial modules + SMS connector. I did give Sangoma access and they said “I’m updating the system” yesterday (reached out as the CRM module would not accept API request and set a new webhook correclty). I reached out to know if they changed anything.

  • Server works
  • Freepbx seems to load correctly looking at the console
  • Anything GUI only works for about 2 minutes after a server reboot. During those two minutes changes to congifuration seem to stick but a message says “cannot connect to asterisk”.
  • after 2 minutes either the browser goes to an page not found or a message says “Ajax request broken or aborted for an unexpected reason”
  • Calls or even just softphones login do NOT work.
  • After every reboot I seem to be able to access GUI but for a short amount of time. I thought it may have been firewall, but I double checked that my IP is a trusted one and validated that the “outage” happens before the firewall comes back online. To double check I also disabled firewall in that short time I can get to the gui after a reboot and the problem remains.
  • Based on the fwconsole debug log I don’t see anything different that yesterday. If I didn’t know the GUI doesn’t work, I wouldn’t notice anything different via console
  • I tried updating all modules and freepbx and all were already up to date

Now, of course I’ll wait for Sangoma to confirm if they caused this, but do you happen to have any pointer? I’ve a ton of testing to do and all is now halted. In particular, I’m very new to Freepbx and I don’t know if there are more relevant logs I should be checking or how to access them.

This is indicative of a firewall or fail2ban block against your IP. Possibly a misconfigured phone or sip client might cause this, login auth failure etc. You should see evidence of this in /var/log/fail2ban or in /var/log/asterisk/firewall.log

Thanks a ton. Mistery solved.

  • I was trying to test linphone via sip connection. Was not working (well, still not working but that’s another story). Attempted few times.

  • Freepbx firewall (temporarily) banned my actual IP, even if listed as trusted. Did not think that could happen.

  • As a result, GUI stopped working.

  • Assumed it all went down when in fact it just was not reachable for my IP specifically. Went down rabbit hole trying to fix the system when there was nothing to fix.

Resolution was:

  • Delete account in linphone as it would keep trying to connect resulting in random bans after every reboot
  • Reboot server
  • Note to self, try calling from a different ip next time. Duh.

Perhaps unintuitively, the whitelists for fail2ban and firewall are maintained separately. If you’re using the FreePBX firewall module, there’s an advanced setting that will sync them so they can be managed from a single list in Firewall Networks.

Very helpful, thanks. I enabled this in Firewall > Advanced Firewall

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