LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-02-2011, 08:43 PM   #1
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 92

Rep: Reputation: 6
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.
 
Old 10-03-2011, 09:18 AM   #2
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 404

Rep: Reputation: 73
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.
 
1 members found this post helpful.
Old 10-03-2011, 09:36 AM   #3
cheddarcheese
Member
 
Registered: Aug 2011
Location: Massachusetts, USA
Distribution: Fedora; Centos; Puppy
Posts: 92

Original Poster
Rep: Reputation: 6
Perfect! Thank you very much Tshimanga, and thanks for the tips regarding the logs to check.
 
Old 10-03-2011, 10:06 AM   #4
tshikose
Member
 
Registered: Apr 2010
Location: Kinshasa, Democratic Republic of Congo
Distribution: RHEL, Fedora, CentOS
Posts: 404

Rep: Reputation: 73
You're welcome.
Mark the thread as SOLVED.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
selinux in ubuntu not allowing me to shut my system down. unix1adm Ubuntu 1 08-04-2011 11:38 AM
selinux not allowing su to root vonedaddy Linux - Security 3 01-03-2008 06:39 PM
SELinux is not allowing mysql server to start shobhit Linux - Security 1 07-22-2007 06:56 AM
allowing FTP and HTTP nautilus_1987 Linux - Networking 2 06-27-2003 04:28 AM
allowing http, smtp, irc from private lan munisp Linux - Networking 1 12-17-2001 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration