I'm trying to add a new port for forwarding to HAProxy but whenever I try to restart the service with the new configuration I get the error
haproxy-systemd-wrapper: [ALERT] 092/112955 (32277) : Starting frontend my-service: cannot bind socket [<public IP>:4443]
systemctl on CentOS7. Nothing else is using port 4443 (
sudo netstat -apn | grep 4443 comes up blank), and I've got
net.ipv4.ip_forward = 1 and
net.ipv4.ip_nonlocal_bind = 1 set in sysctl.conf. I've also run
sudo setsebool -P haproxy_connect_any=1.
The relevant part of my
haproxy.cfg looks like this:
frontend my-service bind <public_url>:4443 default_backend my-backend
I've also got other frontends binding to 80, 443 and 8080.
I've just tried adding a the port to the list of managed HTTP ports in SELinux with
sudo semanage port -a -t http_port_t -p tcp 4443
But also with no luck