Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Open port 1645 PHP 5.4 #6396

Open
softagon opened this issue Jun 19, 2016 · 2 comments
Open

Open port 1645 PHP 5.4 #6396

softagon opened this issue Jun 19, 2016 · 2 comments

Comments

@softagon
Copy link

It's to possible to open port 1645 in Cartridges PHP 5.4 Scales 1 - 3 Web Load Balancer?

How can i do that? I'm trying to install freeradius for my ISP.

@tiwillia
Copy link
Member

You should be able to bind to port 1645 without an issue in your php code using something like:

$socket = socket_create(AF_INET, SOCK_STREAM, 0);
socket_bind($socket, $_ENV["OPENSHIFT_PHP_IP"], 1645)

The port then should be externally accessible via your application's hostname, for example: myapp-example.rhcloud.com:1645

@Miciah
Copy link
Contributor

Miciah commented Jun 20, 2016

What operating system are you using, and how are you installing OpenShift? The default iptables configuration may block port 1645, and the SELinux policy on Fedora, Red Hat Enterprise Linux, and Centos will block gears from binding to the public NIC's port 1645 as well, which means you will need to (1) modify the iptables configuration and (2) create a custom SELinux policy module to enable processes in gears to bind to port 1645.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants