|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
5ea24b |
policy_module(iptables, 1.0.0)
|
|
Chris PeBenito |
1b9099 |
|
|
Chris PeBenito |
a7ed44 |
########################################
|
|
Chris PeBenito |
a7ed44 |
#
|
|
Chris PeBenito |
a7ed44 |
# Declarations
|
|
Chris PeBenito |
a7ed44 |
#
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
a7ed44 |
type iptables_t;
|
|
Chris PeBenito |
a7ed44 |
type iptables_exec_t;
|
|
Chris PeBenito |
c9428d |
init_system_domain(iptables_t,iptables_exec_t)
|
|
Chris PeBenito |
1e5c2a |
role system_r types iptables_t;
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
a7ed44 |
type iptables_tmp_t;
|
|
Chris PeBenito |
c9428d |
files_tmp_file(iptables_tmp_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
d25dd9 |
type iptables_var_run_t;
|
|
Chris PeBenito |
c9428d |
files_pid_file(iptables_var_run_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
a7ed44 |
########################################
|
|
Chris PeBenito |
a7ed44 |
#
|
|
Chris PeBenito |
a7ed44 |
# Iptables local policy
|
|
Chris PeBenito |
a7ed44 |
#
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
a7ed44 |
allow iptables_t self:capability { net_admin net_raw };
|
|
Chris PeBenito |
1e5c2a |
dontaudit iptables_t self:capability sys_tty_config;
|
|
Chris PeBenito |
1e5c2a |
allow iptables_t self:process { sigchld sigkill sigstop signull signal };
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
dd8229 |
allow iptables_t iptables_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
c9428d |
files_create_pid(iptables_t,iptables_var_run_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
dd8229 |
can_exec(iptables_t,iptables_exec_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
dd8229 |
allow iptables_t iptables_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
dd8229 |
allow iptables_t iptables_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
c9428d |
files_create_tmp_files(iptables_t, iptables_tmp_t, { file dir })
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
dd8229 |
allow iptables_t self:rawip_socket create_socket_perms;
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
a7ed44 |
kernel_read_system_state(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
kernel_read_network_state(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
kernel_read_kernel_sysctl(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
kernel_read_modprobe_sysctl(iptables_t)
|
|
Chris PeBenito |
0fd9dc |
kernel_use_fd(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
d35c62 |
dev_read_sysfs(iptables_t)
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
0fd9dc |
fs_getattr_xattr_fs(iptables_t)
|
|
Chris PeBenito |
ab940a |
fs_search_auto_mountpoints(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
0fd9dc |
term_dontaudit_use_console(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
c9428d |
domain_use_wide_inherit_fd(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
c9428d |
init_use_fd(iptables_t)
|
|
Chris PeBenito |
c9428d |
init_use_script_pty(iptables_t)
|
|
Chris PeBenito |
daa0e0 |
# to allow rules to be saved on reboot:
|
|
Chris PeBenito |
c9428d |
init_rw_script_tmp_files(iptables_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(iptables_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
# system-config-network appends to /var/log
|
|
Chris PeBenito |
a7ed44 |
#logging_append_system_logs(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
a7ed44 |
miscfiles_read_localization(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
c9428d |
sysnet_domtrans_ifconfig(iptables_t)
|
|
Chris PeBenito |
98a8ea |
sysnet_dns_name_resolve(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
c9428d |
userdom_use_all_user_fd(iptables_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
ab940a |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
ab940a |
term_dontaudit_use_unallocated_tty(iptables_t)
|
|
Chris PeBenito |
ab940a |
term_dontaudit_use_generic_pty(iptables_t)
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
ab940a |
files_dontaudit_read_root_file(iptables_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
132880 |
optional_policy(`firstboot',`
|
|
Chris PeBenito |
57a96c |
firstboot_use_fd(iptables_t)
|
|
Chris PeBenito |
57a96c |
firstboot_write_pipe(iptables_t)
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
132880 |
optional_policy(`modutils',`
|
|
Chris PeBenito |
c9428d |
corecmd_search_sbin(iptables_t)
|
|
Chris PeBenito |
c9428d |
modutils_domtrans_insmod(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
')
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
132880 |
optional_policy(`nis',`
|
|
Chris PeBenito |
ab940a |
# for iptables -L
|
|
Chris PeBenito |
ab940a |
nis_use_ypbind(iptables_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
132880 |
optional_policy(`selinuxutil',`
|
|
Chris PeBenito |
8fd367 |
seutil_sigchld_newrole(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
132880 |
optional_policy(`udev',`
|
|
Chris PeBenito |
c9428d |
udev_read_db(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
')
|