Question

I have developped an application in php. One of its functions is to ping an external server. However, when this action was fired nothing happened. I checked the SELinux log and generated a policy to allow apache daemon to ping (ping works fine if log in as apache user). After installing that policy, no error is shown on SELinux log, but on the httpd log appears a lot of times:

ping: recvmsg: Permission denied

I know it is a SELinux configuration problem (Socket connection maybe?) because if I disable it, it works nice, but this is not an option for me.

I have redirected the output of the ping command to a text file and, after firing the action, this is the result:

PING myhost (myip) 56(84) bytes of data.

--- myhost ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 13002ms

So I am kind of stuck at this point. Anyone can help me?

Thanks a lot.

Was it helpful?

Solution

After a fresh install it all worked. Don't mess with policies, kids.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top