2

I'm having trouble configuring SELinux to allow sending mail.

Reading the SELinux documentation I've found I can manage ports via the semanage command, but the command can't be found.

Is there another way to manage ports using SELinux, or a way for me to find this command? Worst case: Is there a way to disable SELinux, or switch to permissive mode without rebooting?

I'm running Fedora.

Thanks!

2 Answers 2

0

SELinux is a complicated beast I have managed to avoid so far (it's on the todo list somewhere!). However the one command most sysadmins will learn is the one to disable it:

setenforce 0

You can then use this command to check the status of SELinux:

getenforce

A quick google turned up this page on the subject of installing semanage, looks pretty simple.

2
  • That definitely worked. Im testing to see if it solves my mail issue.
    – CMaury
    Mar 8, 2011 at 20:35
  • Mail still not working but at least now I know its not Selinux... Thanks for the help. Accepting answer.
    – CMaury
    Mar 8, 2011 at 23:01
1

Its pretty late (3 years on) but turning off selinux isn't the 'right' answer. You'll find semanage in the policycoreutils-python package, which dosen't seem to be installed by default.

However port forwarding should be handled by firewalld - the one time I needed to use semanage was to set the selinux flags for a samba share.I use the gui for firewalld, but firewall-cmd --permanent [--zone=<zone>] --add-port=<port>[-<port>]/<protocol> should add a port permanantly and firewall-cmd --reload should load it. As always, RTFM for more details.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .