OS: CentOS 7.4.1708

I'm testing SELinux but I can't figure out how to open the config file to view it. I'm sure this is simple but nothing seems to work. How do I do this?

Attempt 1) I navigated to /etc/sysconfig but I can't navigate further into the /selinux folder. This folder is cyan colored which indicates that it is a symbolic link. I'm not sure what to do in that case.

Attempt 2) I typed cat /selinux/config but received the error

cat: /selinux/config: No such file or directory

I'm not trying to edit the config file. I just want to look inside to learn about the settings inside of it.


My Nginx reverse proxy wouldn't work until I entered this into the command line,

httpd_can_network_connect true

I'm trying to look at the config or related files to see/understand what I did to make my reverse proxy work.

Thanks so much for any help!

  • Do you mean that you want to see the domain, file context, etc. definitions? – Ignacio Vazquez-Abrams Feb 9 '18 at 17:24
  • httpd_can_network_connect true I used this command to make a reverse proxy server work and I'm trying to figure out what I did by looking at the config or related file. – DR01D Feb 9 '18 at 17:26

The SELinux policy source is in the selinux-policy SRPM. Once you have downloaded, installed, and patch-built it you will need to look under serefpolicy-x.y.z/policy/modules/contrib/apache.* to find all the httpd-related rules and booleans and then follow the rabbit down the hole from there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.