Chris PeBenito cd3ee9
Chris PeBenito 6c53a1
policy_module(fail2ban,1.0.2)
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 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 cd3ee9
allow fail2ban_t self:unix_stream_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 cd3ee9
manage_files_pattern(fail2ban_t,fail2ban_log_t,fail2ban_log_t)
Chris PeBenito cd3ee9
logging_log_filetrans(fail2ban_t,fail2ban_log_t,file)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
# pid file
Chris PeBenito cd3ee9
manage_files_pattern(fail2ban_t,fail2ban_var_run_t,fail2ban_var_run_t)
Chris PeBenito cd3ee9
files_pid_filetrans(fail2ban_t,fail2ban_var_run_t, 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 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 cd3ee9
files_read_usr_files(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 cd3ee9
logging_read_generic_logs(fail2ban_t)
Chris PeBenito cd3ee9
Chris PeBenito cd3ee9
miscfiles_read_localization(fail2ban_t)
Chris PeBenito cd3ee9
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
')