jloh.csf-ansible-role
Rol de Ansible CSF
Requisitos
Ninguno
Variables del Rol
Las variables se manejan en dos etapas:
csf_global_conf
Las variables en este ámbito se establecen a nivel de grupo y se despliegan en todos los servidores.csf_conf
Las variables en este ámbito se establecen solo de manera individual en cada servidor.csf_allow_ip
Los valores en ese arreglo se agregarán al archivo /etc/csf/csf.allow.csf_rules
Las reglas colocadas en esta variable se copian derole_dir/files/rules/common/{{ item.rule }}.allow
.
TODO: Hacer esto mucho más ordenado.
Dependencias
Ninguna
Ejemplo de Playbook
- hosts: firewalls
roles:
- { role: jloh.csf-ansible-role }
En group_vars/firewalls
:
csf_global_conf:
- name: CLUSTER_PORT
config: "7786"
- name: CLUSTER_KEY
config: "una clave de clúster aleatoria"
- name: DENY_TEMP_IP_LIMIT
config: "200"
- name: LF_CONSOLE_EMAIL_ALERT
config: "1"
- name: LF_GLOBAL
config: "3600"
- name: GLOBAL_DYNDNS_INTERVAL
config: "600"
- name: URLGET
config: "2"
csf_allow:
- 12.12.12.12 # IP de la oficina
- 138.44.33.22 # monitoreo
- 198.33.22.11
- 45.22.11.22
csf_ignore:
- 12.12.12.12 # IP de la oficina
- 138.44.33.22 # monitoreo
- 198.33.22.11
- 45.22.11.22
csf_blocklists:
- SPAMEDROP
- DSHIELD
- TOR
- ALTTOR
- BOGON
- HONEYPOT
- CIARMY
- BFB
- OPENBL
- AUTOSHUN
- MAXMIND
- BDE
- STOPFORUMSPAM
En host_vars/firewall-01
:
csf_conf:
- name: CLUSTER_RECVFROM
config: "162.243.144.14,103.4.18.200,80.69.77.247"
- name: CLUSTER_SENDTO
config: "162.243.144.14,103.4.18.200,80.69.77.247"
- name: TCP_IN
config: "80,443"
- name: TCP_OUT
config: "25,53,80,443"
- name: UDP_IN
config: ""
- name: UDP_OUT
config: "25,123"
- name: TCP6_IN
config: "80,443"
- name: TCP6_OUT
config: "25,53,80,443"
- name: UDP6_IN
config: ""
- name: UDP6_OUT
config: "25,123"
csf_rules:
- rule: nagios
- rule: munin
Licencia
MIT
Contribuidores
¡Muchos! Por favor, revisa el gráfico de contribuyentes!
Información del Autor
Para otros roles y información técnica general, no dudes en revisar mi blog.
Acerca del proyecto
Install and configure Config Server Firewall (CSF) from scratch
Instalar
ansible-galaxy install jloh.csf-ansible-role
Licencia
mit
Descargas
163
Propietario
Engineer at @TryGhost