{"id":13589322,"url":"https://github.com/gongo/itamae-plugin-resource-firewalld","last_synced_at":"2025-06-27T10:06:51.489Z","repository":{"id":24850740,"uuid":"28265830","full_name":"gongo/itamae-plugin-resource-firewalld","owner":"gongo","description":"Itamae resource plugin to manage firewalld","archived":false,"fork":false,"pushed_at":"2015-10-03T05:20:49.000Z","size":257,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T00:32:24.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/gongo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-20T11:56:08.000Z","updated_at":"2023-05-24T01:38:48.000Z","dependencies_parsed_at":"2022-08-23T06:01:24.841Z","dependency_job_id":null,"html_url":"https://github.com/gongo/itamae-plugin-resource-firewalld","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/gongo/itamae-plugin-resource-firewalld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gongo%2Fitamae-plugin-resource-firewalld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gongo%2Fitamae-plugin-resource-firewalld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gongo%2Fitamae-plugin-resource-firewalld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gongo%2Fitamae-plugin-resource-firewalld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gongo","download_url":"https://codeload.github.com/gongo/itamae-plugin-resource-firewalld/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gongo%2Fitamae-plugin-resource-firewalld/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260575661,"owners_count":23030557,"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":[],"created_at":"2024-08-01T16:00:27.923Z","updated_at":"2025-06-27T10:06:51.444Z","avatar_url":"https://github.com/gongo.png","language":"Ruby","funding_links":[],"categories":["Plugins"],"sub_categories":["Resources"],"readme":"# Itamae::Plugin::Resource::Firewalld\n\n[Itamae](https://github.com/ryotarai/itamae) resource plugin to manage [firewalld](https://fedorahosted.org/firewalld/).\n\n[![Build Status](https://travis-ci.org/gongo/itamae-plugin-resource-firewalld.svg?branch=master)](https://travis-ci.org/gongo/itamae-plugin-resource-firewalld)\n[![Coverage Status](https://coveralls.io/repos/gongo/itamae-plugin-resource-firewalld/badge.png?branch=master)](https://coveralls.io/r/gongo/itamae-plugin-resource-firewalld?branch=master)\n[![Code Climate](https://codeclimate.com/github/gongo/itamae-plugin-resource-firewalld/badges/gpa.svg)](https://codeclimate.com/github/gongo/itamae-plugin-resource-firewalld)\n\n## Usage\n\n```ruby\nservice 'firewalld' do\n  action [:start, :enable]\nend\n\nfirewalld_zone 'external' do\n  interfaces %w(enp0s8 enp0s9)\n  services   %w(ssh)\n\n  masquerade true\n\n  notifies  :restart, 'service[firewalld]'\nend\n\nfirewalld_zone 'public' do\n  interfaces %w(enp0s3)\n  services   %w(ssh https mysql)\n  ports      %w(8080/tcp 4243/udp)\n\n  default_zone true\n\n  notifies :restart, 'service[firewalld]'\nend\n```\n\nAfter `itamae` execute:\n\n```\n$ sudo firewall-cmd --list-all --zone external\nexternal (active)\n  interfaces: enp0s8 enp0s9\n  sources:\n  services: ssh\n  ports:\n  masquerade: yes\n  forward-ports:\n  icmp-blocks:\n  rich rules:\n\n$ sudo firewall-cmd --list-all --zone public\npublic (default, active)\n  interfaces: enp0s3\n  sources:\n  services: https mysql ssh\n  ports: 4243/udp 8080/tcp\n  masquerade: no\n  forward-ports:\n  icmp-blocks:\n  rich rules:\n```\n\n### See also\n\nDemonstration environment [examples](./examples)\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'itamae-plugin-resource-firewalld'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install itamae-plugin-resource-firewalld\n\n## Features\n\n### firewalld_zone\n\nProvides a `firewalld_zone` resource that operation of `Zone`:\n\n```ruby\nfirewalld_zone 'zone_name' do\n  name          # [String]\n\n  interfaces    # [Array of string]\n  sources       # [Array of string]\n  services      # [Array of string]\n  ports         # [Array of string]\n  forward_ports # [Array of string]\n  icmp_blocks   # [Array of string]\n  rich_rules    # [Array of string]\n\n  masquerade    # [True / False]\n  default_zone  # [True] Ignored other\nend\n```\n\n### firewalld_service\n\nProvides a `firewalld_service` resource that can create or delete of `Service`:\n\n```ruby\nfirewalld_service 'my-service' do\n  action      # [:create or :delete]\n\n  short       # [String]\n  description # [String]\n  ports       # [Array of String]\n  module_name # [String]\n  to_ipv4     # [String]\n  to_ipv6     # [String]\nend\n```\n\nAfter `itamae` execute, `/etc/firewalld/service/my-service.xml` is created.\n\n## IMPORTANT\n\n`itamae-plugin-resource-firewalld`'s resource performs the processing `firewall-cmd` with [--permanent](http://fedoraproject.org/wiki/FirewallD#Permanent_zone_handling) .\n\n## TODO\n\nUnimplemented:\n\n- Add a new `zone` and `icmptype` resource\n- Operation of `Direct`, `Lockdown`\n- Etc...\n\nI'll be waiting for your pull request :bow:\n\n## Contributing\n\n1. Fork it ( https://github.com/gongo/itamae-plugin-resource-firewalld/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgongo%2Fitamae-plugin-resource-firewalld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgongo%2Fitamae-plugin-resource-firewalld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgongo%2Fitamae-plugin-resource-firewalld/lists"}