|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
1b9099 |
policy_module(iptables, 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 |
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 |
8bd678 |
dev_read_sysfs(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 |
0fd9dc |
fs_getattr_xattr_fs(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 |
c9428d |
files_read_generic_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 |
1e5c2a |
|
|
Chris PeBenito |
c9428d |
userdom_use_all_user_fd(iptables_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
daa0e0 |
tunable_policy(`use_dns',`
|
|
Chris PeBenito |
dd8229 |
allow iptables_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
d115b2 |
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_if(iptables_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_if(iptables_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_all_nodes(iptables_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_raw_sendrecv_all_nodes(iptables_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_bind_all_nodes(iptables_t)
|
|
Chris PeBenito |
0fd9dc |
corenet_udp_sendrecv_dns_port(iptables_t)
|
|
Chris PeBenito |
d115b2 |
|
|
Chris PeBenito |
c9428d |
sysnet_read_config(iptables_t)
|
|
Chris PeBenito |
daa0e0 |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
a7ed44 |
optional_policy(`modutils.te', `
|
|
Chris PeBenito |
c9428d |
corecmd_search_sbin(iptables_t)
|
|
Chris PeBenito |
c9428d |
modutils_domtrans_insmod(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
')
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
1e5c2a |
optional_policy(`selinux.te',`
|
|
Chris PeBenito |
5e0da6 |
seutil_newrole_sigchld(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
1e5c2a |
optional_policy(`udev.te', `
|
|
Chris PeBenito |
c9428d |
udev_read_db(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
254bbc |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
0fd9dc |
term_dontaudit_use_unallocated_tty(iptables_t)
|
|
Chris PeBenito |
31908b |
term_dontaudit_use_generic_pty(iptables_t)
|
|
Chris PeBenito |
d115b2 |
|
|
Chris PeBenito |
c9428d |
files_dontaudit_read_root_file(iptables_t)
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
a7ed44 |
ifdef(`TODO',`
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
1e5c2a |
optional_policy(`rhgb.te', `
|
|
Chris PeBenito |
1e5c2a |
allow iptables_t rhgb_t:process sigchld;
|
|
Chris PeBenito |
1e5c2a |
allow iptables_t rhgb_t:fd use;
|
|
Chris PeBenito |
dd8229 |
allow iptables_t rhgb_t:fifo_file rw_file_perms;
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
daa0e0 |
allow iptables_t autofs_t:dir { search getattr };
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
a7ed44 |
# for iptables -L
|
|
Chris PeBenito |
a7ed44 |
can_ypbind(iptables_t)
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
25baab |
optional_policy(`gnome-pty-helper.te',`
|
|
Chris PeBenito |
0c73cd |
allow iptables_t sysadm_gph_t:fd use;
|
|
Chris PeBenito |
25baab |
')
|
|
Chris PeBenito |
a7ed44 |
|
|
Chris PeBenito |
25baab |
optional_policy(`firstboot.te', `
|
|
Chris PeBenito |
0c73cd |
allow iptables_t firstboot_t:fifo_file write;
|
|
Chris PeBenito |
a7ed44 |
')
|
|
Chris PeBenito |
a7ed44 |
') dnl ifdef TODO
|