Much clearer
So it looks like you (Zentyal) DNS is not configured for this purpose.
I assume that Zentyal is your DNS for internal clients and servers too.
the short answer is "configure Zentyal DNS by setting an IP for domain.com domain"
The longer and controversial answer is:
"this is the side effect of using web service not using FQDN"
If you had configured everything with FQDN, you would not face such issue.
If your DNS doesn't contain entry to resolve requests that are not built with host.domain or service.domain but only "domain" then it will not work.
So one option is to add such entry (Zentyal DNS permits it) or to run your application as "real" service, something like chat.domain.com, e.g., so that you can add it as A record (host) or CNAME (alias) in DNS.
You may have to do the same with external DNS if you want to keep some consistency.
If my analysis is correct, then it has nothing to do with FW but DNS instead.