{"id":20505789,"url":"https://github.com/digilolnet/go-firewalld","last_synced_at":"2026-04-17T22:03:19.845Z","repository":{"id":240794387,"uuid":"803498217","full_name":"digilolnet/go-firewalld","owner":"digilolnet","description":"Programmatically interact with firewalld using Go.","archived":false,"fork":false,"pushed_at":"2024-05-21T20:36:03.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-16T07:57:23.130Z","etag":null,"topics":["dbus","firewall","firewalld","iptables"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digilolnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-05-20T20:52:03.000Z","updated_at":"2024-10-01T01:16:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"d9915079-66ec-4c1d-8627-4118d8c464ec","html_url":"https://github.com/digilolnet/go-firewalld","commit_stats":null,"previous_names":["digilolnet/go-firewalld"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digilolnet%2Fgo-firewalld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digilolnet%2Fgo-firewalld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digilolnet%2Fgo-firewalld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digilolnet%2Fgo-firewalld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digilolnet","download_url":"https://codeload.github.com/digilolnet/go-firewalld/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242105358,"owners_count":20072476,"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":["dbus","firewall","firewalld","iptables"],"created_at":"2024-11-15T19:50:14.421Z","updated_at":"2026-04-17T22:03:19.816Z","avatar_url":"https://github.com/digilolnet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-firewalld\n\n[![Go report](https://goreportcard.com/badge/github.com/digilolnet/go-firewalld)](https://goreportcard.com/report/github.com/digilolnet/go-firewalld)\n[![GoDoc](https://godoc.org/github.com/digilolnet/go-firewalld?status.svg)](https://godoc.org/github.com/digilolnet/go-firewalld)\n[![License](https://img.shields.io/github/license/digilolnet/go-firewalld.svg)](https://github.com/digilolnet/go-firewalld/blob/master/LICENSE.md)\n\nGo wrapper for firewalld D-Bus interface.\n\n[![Digilol offers managed hosting and software development](https://www.digilol.net/banner-hosting-development.png)](https://www.digilol.net)\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/digilolnet/go-firewalld\"\n)\n\nfunc main() {\n\tfw, err := firewalld.NewFirewalldClient()\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n\n\t// Add new chain using permanent direct rule\n\tif err := fw.DirectAddChainPermanent(\"ipv4\", \"filter\", \"MYCHAIN\"); err != nil {\n\t\tlog.Println(err)\n\t}\n\n\t// Handle packets related to processes with owner UID 1000 at MYCHAIN\n\tif err := fw.DirectAddRulePermanent(\"ipv4\", \"filter\", \"OUTPUT\", 0, \"-m owner --uid-owner 1000 -j MYCHAIN\"); err != nil {\n\t\tlog.Println(err)\n\t}\n\n\tif err := fw.DirectAddRulePermanent(\"ipv4\", \"filter\", \"MYCHAIN\", 0, \"-m state --state ESTABLISHED,RELATED -j ACCEPT\"); err != nil {\n\t\tlog.Println(err)\n\t}\n\n\tif err := fw.DirectAddRulePermanent(\"ipv4\", \"filter\", \"MYCHAIN\", 0, \"-p udp --dport 53 -j ACCEPT\"); err != nil {\n\t\tlog.Println(err)\n\t}\n\t\n\tif err := fw.DirectAddRulePermanent(\"ipv4\", \"filter\", \"MYCHAIN\", 0, \"-j REJECT\"); err != nil {\n\t\tlog.Println(err)\n\t}\n\n\t// Reload for changes to take effect immediately\n\tif err := fw.Reload(); err != nil {\n\t\tlog.Println(err)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigilolnet%2Fgo-firewalld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigilolnet%2Fgo-firewalld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigilolnet%2Fgo-firewalld/lists"}