I would suggest to try to disable “Long polling” mode of the app. To do that go to “Administration | Git X-Modules” page, uncheck “Use Long Polling” checkbox, and apply the change.
By default Git X-Modules app keeps an open connection from Bitbucket to your browser and thus the UI reacts immediately to the changes in the repositories without any need to refresh the page. By disabling “Long polling”, the open connection is replaced with periodic queries with the same effect of refreshing UI automatically. If your firewall doesn’t allow long lasting connections but allows short periodic queries, this would address the issue.
However there’s a chance that when you open “Administration | Git X-Modules” page you’ll still see “Connection Timeout” and thus you’ll be unable to uncheck this checkbox. I this case I would suggest 2 solutions:
Use another browser or another network that wouldn’t be behind firewall just to disable “Long polling”. After disabling it, I would expect Git X-Modules to work even through the firewall.
Git X-Modules can be fully automated using REST. To disable “Long polling” with ‘curl’ run
curl -u $BITBUCKET_USER:$BITBUCKET_PASSWORD $BITBUCKET_URL/rest/gx/1.0/scheduler/schedule --header "Content-Type: application/json" --header "X-Atlassian-Token:no-check" -d @disable-long-polling.json
where disable-long-polling.json (2.8 KB) file is attached to this post.
I hope that after disabling “Long polling” everything will work fine. Meanwhile we will try to address the problem at the app level to prevent it from happening in the first place.