Skip to contentSkip to conversation

Port Binding Being Allowed

DISCUSSION Steven Harp 2 participants 2 messages Aug 17, 2004 – Aug 18, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Suggest making sure the CONFIG_SECURITY_NETWORK security option in the kernel build has been enabled. Curiously, this is off by default in this config....

CONFIG_SECURITY_NETWORK=y

Quoted 9 lines · Eric Andreychek

Howdy,

I'm setting up an SELinux box using Hardened Gentoo, the 2.6.7-r7 kernel, with SMP enabled. The goal is to set up a multi-user box with some reasonable security measures in place.

I'm hoping to restrict who can bind to a local port (ie, disallow someone from running a daemon). It's my impression that this is the default, but it unfortunatly doesn't seem to be working for me.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFBImktPcFX9H2zuSkRAlW3AKC2Hee12tL6ADNy3SjeH7U6oiGJtwCeNABu YUFtP9EDjGcBj9myUC1KuE4=
=2ToS
-----END PGP SIGNATURE-----

--
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Howdy,

Quoted 3 lines · Steven Harp

Suggest making sure the CONFIG_SECURITY_NETWORK security option in the kernel build has been enabled. Curiously, this is off by default in this config....

Aha!

After enabling that and rebooting, port binding is restricted as expected:

 $ nc -l -p 9001
 Can't grab 0.0.0.0:9001 with bind : Permission denied

Thanks for your help!
-Eric

- --
Eric Andreychek
Residential Warranty Corporation
(717) 561-4480 x2245
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBIyTYR5UKaDAjAG4RAkG5AJ9vdbJgh6N9Ilme3aLmUzcVezTUHQCfSa2q /y3d47Cly1UyR95AdQCIIRg=
=Ct6T
-----END PGP SIGNATURE-----

--
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.