|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
d3d270 |
policy_module(iptables,1.1.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 |
1c1ac6 |
files_pid_filetrans(iptables_t,iptables_var_run_t,file)
|
|
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 |
103fe2 |
files_tmp_filetrans(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 |
445522 |
kernel_read_kernel_sysctls(iptables_t)
|
|
Chris PeBenito |
445522 |
kernel_read_modprobe_sysctls(iptables_t)
|
|
Chris PeBenito |
1c1ac6 |
kernel_use_fds(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 |
bf080a |
mls_file_read_up(iptables_t)
|
|
Chris PeBenito |
bf080a |
|
|
Chris PeBenito |
0fd9dc |
term_dontaudit_use_console(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
15722e |
domain_use_interactive_fds(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
1c1ac6 |
init_use_fds(iptables_t)
|
|
Chris PeBenito |
1815ba |
init_use_script_ptys(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 |
15722e |
userdom_use_all_users_fds(iptables_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
ab940a |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_unallocated_ttys(iptables_t)
|
|
Chris PeBenito |
1815ba |
term_dontaudit_use_generic_ptys(iptables_t)
|
|
Chris PeBenito |
9e04f5 |
files_dontaudit_read_root_files(iptables_t)
|
|
Chris PeBenito |
ab940a |
')
|
|
Chris PeBenito |
ab940a |
|
|
Chris PeBenito |
132880 |
optional_policy(`firstboot',`
|
|
Chris PeBenito |
1c1ac6 |
firstboot_use_fds(iptables_t)
|
|
Chris PeBenito |
1815ba |
firstboot_write_pipes(iptables_t)
|
|
Chris PeBenito |
57a96c |
')
|
|
Chris PeBenito |
57a96c |
|
|
Chris PeBenito |
132880 |
optional_policy(`modutils',`
|
|
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 |
')
|