-1

I've been trying to get a web client to use EJabberd on the recommended port (5281) through a reverse proxy (HAProxy) on Centos7 with SELinux enabled. I am not familiar with SELinux context rules.

The basic problem seems to be that HAProxy cannot open port 5281. I've installed the ejabberd-selinux package thinking that would help on both the proxy system and the system running EJabber. The ejabberd-selinux seems to configure the standard ports except 5281 which I subsequently attempted to configure myself.

chicks
  • 3,639
  • 10
  • 26
  • 36
Scott
  • 1

2 Answers2

0

You can't have two things listening on the same port. Either it should be ejabberd or it should be haproxy. Usually you'd put haproxy in front of ejabberd so if you want clients to connect on port 5281 then that's the port haproxy needs to listen on. Then the ejabberd is on some arbitrary port and you put that port number in your backend section of the haproxy.cfg.

chicks
  • 3,639
  • 10
  • 26
  • 36
  • Thanks, but I should have said that ejabberd and haproxy are running on separate systems. – Scott Oct 02 '18 at 14:15
0
  1. You could check whether ejabberd listen on port 5281 only in localhost interface or all interface.
  2. CentOS 7 comes with firewalld as default firewall management tools, you can use this service to allow/open specific port to your server

firewalld

How to setup firewall on centos 7 with firewalld

victoroloan
  • 196
  • 4