Chris PeBenito 29af4c
policy_module(iptables, 1.11.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type iptables_t;
Chris PeBenito 17de1b
type iptables_exec_t;
Chris PeBenito 3f67f7
init_system_domain(iptables_t, iptables_exec_t)
Chris PeBenito 17de1b
role system_r types iptables_t;
Chris PeBenito 17de1b
Chris PeBenito 7491a9
type iptables_initrc_exec_t;
Chris PeBenito 7491a9
init_script_file(iptables_initrc_exec_t)
Chris PeBenito 7491a9
Chris PeBenito 17de1b
type iptables_tmp_t;
Chris PeBenito 17de1b
files_tmp_file(iptables_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type iptables_var_run_t;
Chris PeBenito 17de1b
files_pid_file(iptables_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Iptables local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito d6605b
allow iptables_t self:capability { dac_read_search dac_override net_admin net_raw };
Chris PeBenito 17de1b
dontaudit iptables_t self:capability sys_tty_config;
Dan Walsh 2968e0
allow iptables_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow iptables_t self:process { sigchld sigkill sigstop signull signal };
Dan Walsh 3eaa99
# needed by ipvsadm
Dan Walsh 3eaa99
allow iptables_t self:netlink_socket create_socket_perms;
Chris PeBenito c0868a
allow iptables_t self:rawip_socket create_socket_perms;
Chris PeBenito 17de1b
Dan Walsh 3eaa99
files_manage_system_conf_files(iptables_t)
Dan Walsh 3eaa99
files_etc_filetrans_system_conf(iptables_t)
Chris PeBenito 7491a9
Chris PeBenito d6605b
manage_files_pattern(iptables_t, iptables_var_run_t, iptables_var_run_t)
Chris PeBenito 3f67f7
files_pid_filetrans(iptables_t, iptables_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 3f67f7
can_exec(iptables_t, iptables_exec_t)
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow iptables_t iptables_tmp_t:dir manage_dir_perms;
Chris PeBenito c0868a
allow iptables_t iptables_tmp_t:file manage_file_perms;
Chris PeBenito 17de1b
files_tmp_filetrans(iptables_t, iptables_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 7491a9
kernel_request_load_module(iptables_t)
Chris PeBenito 17de1b
kernel_read_system_state(iptables_t)
Chris PeBenito 17de1b
kernel_read_network_state(iptables_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(iptables_t)
Chris PeBenito 17de1b
kernel_read_modprobe_sysctls(iptables_t)
Chris PeBenito 17de1b
kernel_use_fds(iptables_t)
Chris PeBenito 17de1b
Dan Walsh 3eaa99
# needed by ipvsadm
Dan Walsh 3eaa99
corecmd_exec_bin(iptables_t)
Dan Walsh 3eaa99
corecmd_exec_shell(iptables_t)
Dan Walsh 3eaa99
Chris PeBenito 17de1b
corenet_relabelto_all_packets(iptables_t)
Chris PeBenito 4fbcd7
corenet_dontaudit_rw_tun_tap_dev(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(iptables_t)
Dan Walsh 3eaa99
ifdef(`hide_broken_symptoms',`
Dan Walsh 3eaa99
	dev_dontaudit_write_mtrr(iptables_t)
Dan Walsh 3eaa99
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_xattr_fs(iptables_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(iptables_t)
Chris PeBenito 9acf48
fs_list_inotifyfs(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito f8233a
mls_file_read_all_levels(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
term_dontaudit_use_console(iptables_t)
Dan Walsh 3eaa99
term_use_all_terms(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(iptables_t)
Chris PeBenito 6649ae
files_read_etc_runtime_files(iptables_t)
Dan Walsh 3eaa99
files_read_usr_files(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 8d2c34
auth_use_nsswitch(iptables_t)
Chris PeBenito 8d2c34
Chris PeBenito 17de1b
init_use_fds(iptables_t)
Chris PeBenito 17de1b
init_use_script_ptys(iptables_t)
Chris PeBenito 17de1b
# to allow rules to be saved on reboot:
Chris PeBenito 17de1b
init_rw_script_tmp_files(iptables_t)
Chris PeBenito eaed90
init_rw_script_stream_sockets(iptables_t)
Dan Walsh 3eaa99
init_dontaudit_script_leaks(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_domtrans_ifconfig(iptables_t)
Chris PeBenito 17de1b
sysnet_dns_name_resolve(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 296273
userdom_use_user_terminals(iptables_t)
Chris PeBenito 17de1b
userdom_use_all_users_fds(iptables_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 6649ae
	fail2ban_append_log(iptables_t)
Dan Walsh 3eaa99
	fail2ban_dontaudit_leaks(iptables_t)
Chris PeBenito 6649ae
')
Chris PeBenito 6649ae
Chris PeBenito 6649ae
optional_policy(`
Chris PeBenito 17de1b
	firstboot_use_fds(iptables_t)
Chris PeBenito d6d16b
	firstboot_rw_pipes(iptables_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	modutils_domtrans_insmod(iptables_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	# for iptables -L
Chris PeBenito 17de1b
	nis_use_ypbind(iptables_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito d6d16b
	ppp_dontaudit_use_fds(iptables_t)
Chris PeBenito d6d16b
')
Chris PeBenito d6d16b
Chris PeBenito d6d16b
optional_policy(`
Chris PeBenito 7491a9
	psad_rw_tmp_files(iptables_t)
Dan Walsh 3eaa99
	psad_write_log(iptables_t)
Chris PeBenito 7491a9
')
Chris PeBenito 7491a9
Chris PeBenito 7491a9
optional_policy(`
Chris PeBenito eaed90
	rhgb_dontaudit_use_ptys(iptables_t)
Chris PeBenito eaed90
')
Chris PeBenito eaed90
Chris PeBenito eaed90
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(iptables_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 4fbcd7
	shorewall_rw_lib_files(iptables_t)
Dan Walsh f5b49a
	shorewall_read_tmp_files(iptables_t)
Chris PeBenito 4fbcd7
')
Chris PeBenito 4fbcd7
Chris PeBenito 4fbcd7
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(iptables_t)
Chris PeBenito 17de1b
')