LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SELinux Query - Allowing http out (https://www.linuxquestions.org/questions/linux-newbie-8/selinux-query-allowing-http-out-906124/)

cheddarcheese 10-02-2011 07:43 PM

SELinux Query - Allowing http out
 
Hi,

I have a new server, Centos 6, onto which I'm migrating a number of existing sites. They mostly seem to work without any problem on the new box, but I am having issues with one.

This particular site, upon receiving http requests, then makes http requests of its own out into the www, to retrieve certain data. However, with SELinux enabled (which I want), it always fails, with a message something like "500 Can't connect ... Permission Denied." With SELinux disabled it works.

So, even though visitors can make http requests okay, the site itself cannot make any http requests out. FYI, the same request from the command line works fine.

I would really like to leave SELinux enabled if possible, but I have no idea how or what to configure in order to allow what I want.

Any assistance much appreciated! Thx.

tshikose 10-03-2011 08:18 AM

Hi,

Always first check the log files, particularly /var/log/messages and /var/log/audit/audit.log.

That said, try out this command

Quote:

setsebool -P httpd_can_network_connect on
Regards,

Tshimanga.

cheddarcheese 10-03-2011 08:36 AM

Perfect! Thank you very much Tshimanga, and thanks for the tips regarding the logs to check.

tshikose 10-03-2011 09:06 AM

You're welcome.
Mark the thread as SOLVED.


All times are GMT -5. The time now is 10:47 AM.