honeybee
Goto Top

Frage zu SELinux

Hallo,

ich verwende Ubuntu 14.04.2 und SELinux ist installiert. Ich möchte gern diese Anleitung durchführen.

Wenn ich aber den Befehl

setsebool -P httpd_can_network_connect=1

ausführe, kommt diese Fehlermeldung:

Boolean httpd_can_network_connect is not defined

Frage: Muss man irgendetwas konfigurieren oder nachinstallieren?

Content-Key: 314258

Url: https://administrator.de/contentid/314258

Printed on: April 19, 2024 at 13:04 o'clock

Mitglied: 119944
119944 Sep 02, 2016 updated at 09:16:57 (UTC)
Goto Top
Moin,

teste erstmal mit folgendem Befehl welche Variablen unter Ubuntu dafür überhaupt existieren:
getsebool -a | grep http


Unter CentOS gibt es die Variable "httpd_can_network_connect" definitiv und diese ist per default auf "on".

Außerdem solltest du mal auf 14.04.5 upgraden face-wink

VG
Val
Member: honeybee
honeybee Sep 02, 2016 at 09:21:00 (UTC)
Goto Top
Ergebnis:

root@xxx:# getsebool -a | grep http
root@xxx:#

Also nichts...

Außerdem solltest du mal auf 14.04.5 upgraden

Sorry, war ein Tippfehler. Ich habe tatsächlich die Version 14.04.5.
Mitglied: 119944
119944 Sep 02, 2016 at 09:29:58 (UTC)
Goto Top
ok eher schlecht face-wink
https://wiki.ubuntu.com/SELinux

Da Ubuntu auf AppArmor vertraut wird Selinux wohl nicht mehr wirklich gepflegt.
Member: honeybee
honeybee Sep 02, 2016 at 09:39:19 (UTC)
Goto Top
Es ist schon installiert... Deshalb war ja meine Frage, ob ich noch was konfigurieren muss.
Mitglied: 129813
129813 Sep 02, 2016 updated at 10:03:14 (UTC)
Goto Top
Hi,
you did not install the default policies for the most common daemons
https://wiki.debian.org/SELinux/Setup

But I would never use SELinux on "Ubuntu"...whooaa this sends cold shivers up and down my spine.
face-smile

Get a secure distribution wich is based on RedHat!

It seems you don't know what you are doing there and why -> very bad combination.

Regards
Member: honeybee
honeybee Sep 02, 2016 at 10:04:19 (UTC)
Goto Top
you did not install the default policies for the most common daemons

Now it's installed and I still get the error that something isn't defined.

But I would never use SELinux on "Ubuntu"

Why?
Mitglied: 129813
129813 Sep 02, 2016 updated at 10:16:57 (UTC)
Goto Top
It's not actively maintained anymore, and there are other security flaws around, you can read many of them on the web.
Ubuntu is not a good choice hosting internet facing websites, if it comes to security. Ubuntu is the beginners choice, but not the pro's.

something isn't defined
If the apache policies are not installed you won't get this variable, should be clear.
http://www.serverlab.ca/tutorials/linux/web-servers-linux/configuring-s ...

And don't use the equal sign between variable and boolean value.
Member: honeybee
honeybee Sep 02, 2016 at 13:27:13 (UTC)
Goto Top
I use Ubuntu and I will still use it, because it doesn't have any internet services like hosting websites and such. It's only for monitoring. Plus, i'm not a Linux pro.

Therefore it would be nice if there's a possibility to solve the SELinux problem on Ubuntu.

When I tried to install this package, I got this message:

policycoreutils (version 2.2.5-1) is already installed

Now I don't know what to do to be able to define the missing policy "httpd_can_network_connect".
Mitglied: 129813
Solution 129813 Sep 02, 2016 updated at 13:41:00 (UTC)
Goto Top
Ubuntu uses Apparmor, it's definitely not recommended to run SELinux on it, so don't do it if you use ubuntu!! You will run into a mess of problems. Trust me. I already developed some linux drivers, i know what i'm talking about...
Mitglied: 129813
Solution 129813 Sep 02, 2016 updated at 13:54:41 (UTC)
Goto Top
btw. you don't need SELinux to solve your problem, if you have the problem of your posted link! This is only for RedHat like systems where SELinux and these labels are installed by default. This will not work on ubuntu.
If you want to additionally secure your environment in Ubuntu use Apparmor.
Member: colinardo
colinardo Sep 03, 2016 updated at 09:34:16 (UTC)
Goto Top
Zitat von @129813:

Ubuntu uses Apparmor, it's definitely not recommended to run SELinux on it, so don't do it if you use ubuntu!! You will run into a mess of problems.
Dem kann man nur absolut zustimmen.
Lass die Finger davon. Als Anfänger wirst du damit nicht fertig, vor allem wenn's hinterher ans Updaten geht bekommst du richtig Probleme.

Grüße Uwe