Reader small image

You're reading from  SELinux Cookbook

Product typeBook
Published inSep 2014
Publisher
ISBN-139781783989669
Edition1st Edition
Right arrow
Author (1)
Sven Vermeulen
Sven Vermeulen
author image
Sven Vermeulen

Sven Vermeulen (sjvermeu on Twitter) is a long-term contributor to various free software projects and the author of several online guides and resources, including the Gentoo Handbook. He got his first taste of free software in 1997 and never looked back. Within SELinux, Sven contributed several policies to the Reference Policy project, and actively participated in policy development and user space development projects. In his daily job, Sven is an enterprise architect in a European financial institution as well as a self-employed solution engineer and consultant. Prior to this, he graduated with an MSE in computer engineering from Ghent University and an MSc in ICT enterprise architecture from IC Institute.
Read more about Sven Vermeulen

Right arrow

Governing application network access


On Linux systems, iptables (and more recently, nftables) is the de facto host-based firewall technology. Administrators will undoubtedly use it to prevent access to a service from unauthorized systems. We can also use iptables to identify and label network packets, allowing only authorized applications (domains) to send or receive those network packets.

By default, the SELinux policy supports client and server packets and allows the usual domains access to their client and/or server packets. For instance, the web server domains (such as httpd_t) will have the privileges to send and receive http_server_packet_t packets:

allow httpd_t http_server_packet_t:packet { send recv };

This is provided through the corenet_sendrecv_http_server_packets interface. Enabling packet labeling is simply done using iptables as will be shown through this recipe. But to properly govern network access, custom packet types will need to be created to ensure that no default allowed...

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
SELinux Cookbook
Published in: Sep 2014Publisher: ISBN-13: 9781783989669

Author (1)

author image
Sven Vermeulen

Sven Vermeulen (sjvermeu on Twitter) is a long-term contributor to various free software projects and the author of several online guides and resources, including the Gentoo Handbook. He got his first taste of free software in 1997 and never looked back. Within SELinux, Sven contributed several policies to the Reference Policy project, and actively participated in policy development and user space development projects. In his daily job, Sven is an enterprise architect in a European financial institution as well as a self-employed solution engineer and consultant. Prior to this, he graduated with an MSE in computer engineering from Ghent University and an MSc in ICT enterprise architecture from IC Institute.
Read more about Sven Vermeulen