Skip to contentSkip to conversation

paranoid FC3 setup: banning all login access (!)

DISCUSSION Luke Kenneth Casson Leighton 3 participants 5 messages Dec 20, 2004 – Dec 22, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

hi,

i have a requirement for setting up a server that might even ban logins - even admin logins.

the only things that should be allowed are reboot (ctrl-alt-delete at console) and services (e.g apache).

my question is, therefore: is it possible to _conveniently_ load a completely different selinux policy file (by typing "linux init 3" or other incantation at the grub prompt)

what i want to be able to do is say to my customer "yes, in order to do upgrades and maintenance, you press ctrl-alt-delete, selection option 2) on the boot-loader menu, and you will be dropped into standard admin mode. when you are done, reboot again and let it go back into 'paranoid' mode")

can anyone help advise?

ta,

l.

Signature · 8 lines
--
<a href="http://lkcl.net">http://lkcl.net</a>
--

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 12 lines · Luke Kenneth Casson Leighton

hi,

i have a requirement for setting up a server that might even ban logins - even admin logins.

the only things that should be allowed are reboot (ctrl-alt-delete at console) and services (e.g apache).

my question is, therefore: is it possible to _conveniently_ load a completely different selinux policy file (by typing "linux init 3" or other incantation at the grub prompt)

Quoted 8 lines

what i want to be able to do is say to my customer "yes, in order to do upgrades and maintenance, you press ctrl-alt-delete, selection option 2) on the boot-loader menu, and you will be dropped into standard admin mode. when you are done, reboot again and let it go back into 'paranoid' mode")

can anyone help advise?

How about using a conditional expression (aka "boolean")? That way you can have a whole chunk of plicy that gets turned on only when you need it (maintenance mode). All of the types would always be defined, but the rules would only be active when the conditional expression/boolean is turned on/off. That way you also don't run into the labeling insanity you might encounter with two distinct policies.

David

Signature · 12 lines
__________________________________

David Caplan     410 290 1411 x105
[email protected]
Tresys Technology, LLC
8840 Stanford Blvd., Suite 2100
Columbia, MD 21045

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 9 lines · David Caplan
Quoted 4 lines · Luke Kenneth Casson Leighton

hi,

i have a requirement for setting up a server that might even ban logins - even admin logins.

How about using a conditional expression (aka "boolean")? That way you can have a whole chunk of plicy that gets turned on only when you need it (maintenance mode).

that's a bleeding good idea. thanks.

l.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw
In reply to Luke Kenneth Casson Leighton
Quoted 7 lines · Luke Kenneth Casson Leighton

hi,

i have a requirement for setting up a server that might even ban logins - even admin logins.

the only things that should be allowed are reboot (ctrl-alt-delete at console) and services (e.g apache).

Umm.. how about this:

# chkconfig sshd off
# chkconfig telnetd off

and then 'grep -v getty' to remove those from /etc/inittab?

Leave the ctrl-alt-del entry in inittab, and have a grub entry that boots with init=/bin/bash or similar single-user setup.

#4 lore raw
Quoted 9 lines · On Tue, Dec 21, 2004 at 11:06:41PM -0500, [email protected] wrote:
Quoted 7 lines · Luke Kenneth Casson Leighton

hi,

i have a requirement for setting up a server that might even ban logins - even admin logins.

the only things that should be allowed are reboot (ctrl-alt-delete at console) and services (e.g apache).

Quoted 6 lines

Umm.. how about this:

# chkconfig sshd off
# chkconfig telnetd off

and then 'grep -v getty' to remove those from /etc/inittab?

that's the practical side: thank you.

i hope to recommend removing even the selinux policy that allows getty, sshd, telnetd and other login mechanisms from being run by users (!)

Quoted 2 lines

Leave the ctrl-alt-del entry in inittab, and have a grub entry that boots with init=/bin/bash or similar single-user setup.

... with enable=0 most likely for simplicity, and no networking.

the key issue is whether the customer says that running "enable=0" in that single-user no-networking mode is okay.

if they say "no it isn't" then i will need to go further, as david caplan recommends, by instead of removing the selinux policy for getty, to enable it via a dynamic boolean.

l.

Signature · 8 lines
--
<a href="http://lkcl.net">http://lkcl.net</a>
--

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.