From: Shaun Savage <savages@pcez.com>
To: SELinux@tycho.nsa.gov
Subject: snort files and policy
Date: Thu, 17 Jan 2002 22:24:41 -0800 [thread overview]
Message-ID: <3C47BFA9.1070301@pcez.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
Hi all
Attached is the file needed to get iptables snort to work with selinux.
Now selinux can have the snort NIDS using iptables. I have not tested
it with libpcap interface.
Shaun
[-- Attachment #2: snort.te --]
[-- Type: text/plain, Size: 1553 bytes --]
#
#
# add snort_t to system_r (from rbac)
role system_r types snort_t;
# add snort_t o sysadm_r (from rbac)
role sysadm_r types snort_t;
# allow the admin to enter snort_t domain (from sysadm.te)
domain_auto_trans(sysadm_t, snort_exec_t, snort_t)
# allow output (from sysadm.te)
allow snort_t sysadm_tty_device_t:chr_file rw_file_perms;
allow snort_t sysadm_devpts_t:chr_file rw_file_perms;
allow snort_t sysadm_gph_t:fd inherit_fd_perms;
#################################
#
# Rules for the snort_t domain.
#
# snort_t is the domain for the snort program.
# snort_exec_t is the type of the corresponding program.
# snort_log_t is the type of the log files.
#
type snort_t, domain, privowner, privlog;
type snort_exec_t, file_type, sysadmfile, exec_type;
type snort_log_t, file_type, sysadmfile;
type snort_etc_t, file_type, sysadmfile;
type snort_db_t, file_type, sysadmfile;
type snort_run_t, file_type, sysadmfile;
# Create temporary files.
type snort_tmp_t, file_type, sysadmfile, tmpfile;
file_type_auto_trans(snort_t, tmp_t, snort_tmp_t)
# use iptable netlink
allow snort_t self:netlink_socket create_socket_perms;
allow snort_t self:packet_socket create_socket_perms;
allow snort_t self:capability { net_admin net_raw };
# create run file
file_type_auto_trans(snort_t, var_run_t, snort_run_t)
# Modify /var/log.
allow snort_t snort_log_t:dir ra_dir_perms;
allow snort_t snort_log_t:file create_file_perms;
allow snort_t snort_etc_t:dir r_dir_perms;
allow snort_t snort_etc_t:file r_file_perms;
allow snort_t snort_db_t:file rw_file_perms;
[-- Attachment #3: snort.files --]
[-- Type: text/plain, Size: 146 bytes --]
/usr/sbin/snort system_u:object_r:snort_exec_t
/etc/snort(|/.*) system_u:object_r:snort_etc_t
/var/log/snort(|/.*) system_u:object_r:snort_log_t
reply other threads:[~2002-01-18 6:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C47BFA9.1070301@pcez.com \
--to=savages@pcez.com \
--cc=SELinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.