{"id":22071819,"url":"https://github.com/mhutter/ansible-iptables","last_synced_at":"2025-07-30T03:42:20.905Z","repository":{"id":146445850,"uuid":"135678598","full_name":"mhutter/ansible-iptables","owner":"mhutter","description":null,"archived":false,"fork":false,"pushed_at":"2020-03-07T23:58:02.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T19:17:58.660Z","etag":null,"topics":["ansible","iptables"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhutter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-06-01T06:45:53.000Z","updated_at":"2020-03-07T23:58:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac4f6a5e-345e-450b-8963-bb6a1c6d6357","html_url":"https://github.com/mhutter/ansible-iptables","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mhutter/ansible-iptables","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhutter%2Fansible-iptables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhutter%2Fansible-iptables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhutter%2Fansible-iptables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhutter%2Fansible-iptables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhutter","download_url":"https://codeload.github.com/mhutter/ansible-iptables/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhutter%2Fansible-iptables/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267804103,"owners_count":24146537,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","iptables"],"created_at":"2024-11-30T20:34:28.477Z","updated_at":"2025-07-30T03:42:20.841Z","avatar_url":"https://github.com/mhutter.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# mhutter.iptables\n[![Build Status](https://travis-ci.com/mhutter/ansible-iptables.svg?branch=master)](https://travis-ci.com/mhutter/ansible-iptables)\n\nManage iptables rules using Ansible.\n\n\n## Usage\n\nThis role needs to be included in your playbook twice:\n\n```yaml\n- hosts: all\n  vars:\n    iptables_phase: pre\n  roles:\n    - name: mhutter.iptables\n      tags: iptables\n\n# ... all other plays \u0026 tasks of your playbook\n\n- hosts: all\n  vars:\n    iptables_phase: post\n  roles:\n    - name: mhutter.iptables\n      tags: iptables\n```\n\nThe **pre** phase sets up all requirements (packages, folders, ...) while the\n**post** phase creates some defaults, generates the final iptables rule files\nand applies them.\n\n### Rules\n\nTo add your own rules, drop the appropriate files in\n`/etc/iptables/fragments.{v4,v6}`:\n\n```yaml\n# roles/etcd/tasks/main.yml\n\n- name: Prepare iptables rules\n  copy:\n    content: '-A INPUT -p tcp -m multiport --dports 2379,2380 -j ACCEPT'\n    dest: /etc/iptables/fragments.v4/10_etcd\n    owner: root\n    group: root\n    mode: 0644\n  tags: iptables\n```\n\nTODO: Add module that simplifies rule definitions\n\n## Installation\n\nAdd the following snippet to your `requirements.yml`:\n\n```yaml\n- name: mhutter.iptables\n  version: master\n```\n\nAnd then run `ansible-galaxy install -r requirements.yml` as usual\n\n## Role Variables\n\n* `iptables_phase` - either `pre` or `post`, see \"Usage\" section\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhutter%2Fansible-iptables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhutter%2Fansible-iptables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhutter%2Fansible-iptables/lists"}