Chris PeBenito cd3ee9
Chris PeBenito cdac98
policy_module(fail2ban, 1.1.1)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
########################################
Chris PeBenito cd3ee9
#
Chris PeBenito cd3ee9
# Declarations
Chris PeBenito cd3ee9
#
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
type fail2ban_t;
Chris PeBenito cd3ee9
type fail2ban_exec_t;
Chris PeBenito cd3ee9
init_daemon_domain(fail2ban_t, fail2ban_exec_t)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
# log files
Chris PeBenito cd3ee9
type fail2ban_log_t;
Chris PeBenito cd3ee9
logging_log_file(fail2ban_log_t)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
# pid files
Chris PeBenito cd3ee9
type fail2ban_var_run_t;
Chris PeBenito cd3ee9
files_pid_file(fail2ban_var_run_t)
Chris PeBenito cd3ee9
Chris PeBenito cdac98
type fail2ban_script_exec_t;
Chris PeBenito cdac98
init_script_file(fail2ban_script_exec_t)
Chris PeBenito cdac98
Chris PeBenito cd3ee9
########################################
Chris PeBenito cd3ee9
#
Chris PeBenito cd3ee9
# fail2ban local policy
Chris PeBenito cd3ee9
#
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
allow fail2ban_t self:process signal;
Chris PeBenito cd3ee9
allow fail2ban_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito cdac98
allow fail2ban_t self:unix_stream_socket { connectto create_stream_socket_perms };
Chris PeBenito cdac98
allow fail2ban_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
# log files
Chris PeBenito cd3ee9
allow fail2ban_t fail2ban_log_t:dir setattr;
Chris PeBenito 0bfccd
manage_files_pattern(fail2ban_t, fail2ban_log_t, fail2ban_log_t)
Chris PeBenito 0bfccd
logging_log_filetrans(fail2ban_t, fail2ban_log_t, file)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
# pid file
Chris PeBenito cdac98
manage_sock_files_pattern(fail2ban_t, fail2ban_var_run_t, fail2ban_var_run_t)
Chris PeBenito 0bfccd
manage_files_pattern(fail2ban_t, fail2ban_var_run_t, fail2ban_var_run_t)
Chris PeBenito cdac98
files_pid_filetrans(fail2ban_t, fail2ban_var_run_t, { file sock_file })
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
kernel_read_system_state(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
corecmd_exec_bin(fail2ban_t)
Chris PeBenito cd3ee9
corecmd_exec_shell(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cdac98
corenet_all_recvfrom_unlabeled(fail2ban_t)
Chris PeBenito cdac98
corenet_all_recvfrom_netlabel(fail2ban_t)
Chris PeBenito cdac98
corenet_tcp_sendrecv_generic_if(fail2ban_t)
Chris PeBenito cdac98
corenet_tcp_sendrecv_all_nodes(fail2ban_t)
Chris PeBenito cdac98
corenet_tcp_sendrecv_all_ports(fail2ban_t)
Chris PeBenito cdac98
corenet_tcp_connect_whois_port(fail2ban_t)
Chris PeBenito cdac98
corenet_sendrecv_whois_client_packets(fail2ban_t)
Chris PeBenito cdac98
Chris PeBenito cd3ee9
dev_read_urand(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
domain_use_interactive_fds(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
files_read_etc_files(fail2ban_t)
Chris PeBenito cdac98
files_read_etc_runtime_files(fail2ban_t)
Chris PeBenito cd3ee9
files_read_usr_files(fail2ban_t)
Chris PeBenito cdac98
files_list_var(fail2ban_t)
Chris PeBenito cdac98
files_search_var_lib(fail2ban_t)
Chris PeBenito cdac98
Chris PeBenito cdac98
fs_list_inotifyfs(fail2ban_t)
Chris PeBenito cdac98
fs_getattr_all_fs(fail2ban_t)
Chris PeBenito cdac98
Chris PeBenito cdac98
auth_use_nsswitch(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
libs_use_ld_so(fail2ban_t)
Chris PeBenito cd3ee9
libs_use_shared_libs(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cdac98
logging_read_all_logs(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
miscfiles_read_localization(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cdac98
mta_send_mail(fail2ban_t)
Chris PeBenito cdac98
Chris PeBenito cd3ee9
optional_policy(`
Chris PeBenito cd3ee9
	apache_read_log(fail2ban_t)
Chris PeBenito cd3ee9
')
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
optional_policy(`
Chris PeBenito cd3ee9
	ftp_read_log(fail2ban_t)
Chris PeBenito cd3ee9
')
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
optional_policy(`
Chris PeBenito cd3ee9
	iptables_domtrans(fail2ban_t)
Chris PeBenito cd3ee9
')