{"id":15354759,"url":"https://github.com/jloh/csf-ansible-role","last_synced_at":"2025-10-10T05:10:37.874Z","repository":{"id":82678949,"uuid":"34060126","full_name":"jloh/csf-ansible-role","owner":"jloh","description":"Ansible role for CSF","archived":false,"fork":false,"pushed_at":"2017-09-20T13:40:28.000Z","size":32,"stargazers_count":24,"open_issues_count":1,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-15T06:17:33.943Z","etag":null,"topics":["ansible","ansible-playbook","ansible-role","csf"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jloh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-16T14:19:18.000Z","updated_at":"2022-05-03T08:41:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe4b946a-11dd-4681-be06-f87e7b03611c","html_url":"https://github.com/jloh/csf-ansible-role","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloh%2Fcsf-ansible-role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloh%2Fcsf-ansible-role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloh%2Fcsf-ansible-role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jloh%2Fcsf-ansible-role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jloh","download_url":"https://codeload.github.com/jloh/csf-ansible-role/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016647,"owners_count":21198833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-playbook","ansible-role","csf"],"created_at":"2024-10-01T12:20:51.363Z","updated_at":"2025-10-10T05:10:32.856Z","avatar_url":"https://github.com/jloh.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"CSF Ansible Role\n=========\n\n[![GitHub version](https://badge.fury.io/gh/jloh%2Fcsf-ansible-role.svg)](http://badge.fury.io/gh/jloh%2Fcsf-ansible-role) [![Build Status](https://travis-ci.org/jloh/csf-ansible-role.svg?branch=master)](https://travis-ci.org/jloh/csf-ansible-role)\n\nRequirements\n------------\n\nNone\n\nRole Variables\n--------------\n\nVariables are done in two stages:\n\n * `csf_global_conf`  \n   Variables within this scope are done at a group level and are deployed to all servers\n * `csf_conf`  \n   Variables within this scope should only be done on a per-server basis\n * `csf_allow_ip`\n   Values in that array will be added to /etc/csf/csf.allow file \n * `csf_rules`  \n   Rules placed into this variable are copied from [`role_dir/files/rules/common/{{ item.rule }}.allow`](files/rules/common)  \n   **TODO:** Make this a lot neater\n\nDependencies\n------------\n\nNone\n\nExample Playbook\n----------------\n\n```yaml\n- hosts: firewalls\n  roles:\n     - { role: jloh.csf-ansible-role }\n```\n\nIn `group_vars/firewalls`:\n\n```yaml\ncsf_global_conf:\n  - name: CLUSTER_PORT\n    config: \"7786\"\n  - name: CLUSTER_KEY\n    config: \"some random cluster key\"\n  - name: DENY_TEMP_IP_LIMIT\n    config: \"200\"\n  - name: LF_CONSOLE_EMAIL_ALERT\n    config: \"1\"\n  - name: LF_GLOBAL\n    config: \"3600\"\n  - name: GLOBAL_DYNDNS_INTERVAL\n    config: \"600\"\n  - name: URLGET\n    config: \"2\"\n\ncsf_allow:\n - 12.12.12.12\t# office IP\n - 138.44.33.22\t# monitoring\n - 198.33.22.11\n - 45.22.11.22\n \ncsf_ignore:\n - 12.12.12.12\t# office IP\n - 138.44.33.22\t# monitoring\n - 198.33.22.11\n - 45.22.11.22\n\ncsf_blocklists:\n  - SPAMEDROP\n  - DSHIELD\n  - TOR\n  - ALTTOR\n  - BOGON\n  - HONEYPOT\n  - CIARMY\n  - BFB\n  - OPENBL\n  - AUTOSHUN\n  - MAXMIND\n  - BDE\n  - STOPFORUMSPAM\n```\n\n\nIn `host_vars/firewall-01`:\n\n```yaml\ncsf_conf:\n  - name: CLUSTER_RECVFROM\n    config: \"162.243.144.14,103.4.18.200,80.69.77.247\"\n  - name: CLUSTER_SENDTO\n    config: \"162.243.144.14,103.4.18.200,80.69.77.247\"\n  - name: TCP_IN\n    config: \"80,443\"\n  - name: TCP_OUT\n    config: \"25,53,80,443\"\n  - name: UDP_IN\n    config: \"\"\n  - name: UDP_OUT\n    config: \"25,123\"\n  - name: TCP6_IN\n    config: \"80,443\"\n  - name: TCP6_OUT\n    config: \"25,53,80,443\"\n  - name: UDP6_IN\n    config: \"\"\n  - name: UDP6_OUT\n    config: \"25,123\"\n\n csf_rules:\n  - rule: nagios\n  - rule: munin\n```\n\nLicense\n-------\n\nMIT\n\nContributors\n------------\n\nMany! Please checkout [the contributors graph!](https://github.com/jloh/csf-ansible-role/graphs/contributors)\n\nAuthor Information\n------------------\n\nFor other roles and general tech information please feel free to checkout [my blog](https://jloh.co/l/blog/#pk_campaign=GitHub-Project\u0026pk_kwd=csf-ansible-role).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjloh%2Fcsf-ansible-role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjloh%2Fcsf-ansible-role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjloh%2Fcsf-ansible-role/lists"}