{"id":25810425,"url":"https://github.com/daniel1302/fw-manager","last_synced_at":"2026-06-12T17:33:05.174Z","repository":{"id":257975650,"uuid":"873221294","full_name":"daniel1302/fw-manager","owner":"daniel1302","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-16T20:34:02.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T17:03:06.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/daniel1302.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":"2024-10-15T19:54:40.000Z","updated_at":"2024-10-16T20:33:53.000Z","dependencies_parsed_at":"2024-10-18T02:16:23.259Z","dependency_job_id":null,"html_url":"https://github.com/daniel1302/fw-manager","commit_stats":null,"previous_names":["daniel1302/fw-manager"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/daniel1302/fw-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel1302%2Ffw-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel1302%2Ffw-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel1302%2Ffw-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel1302%2Ffw-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniel1302","download_url":"https://codeload.github.com/daniel1302/fw-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel1302%2Ffw-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34256180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":[],"created_at":"2025-02-27T23:49:12.318Z","updated_at":"2026-06-12T17:33:05.156Z","avatar_url":"https://github.com/daniel1302.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fw-manager\n\n## Replicate multi-cluster consul infrastructure with docker-compose.yaml\n\n```shell\n# If you are experimenting you may want to remove consul homes and recreate clusters from the scratch.\nrm -rf ./consul-home\n\ndocker-compose up -d\n```\n\nIt may take up to 1 minute to startup entire infrastructure as there are some dependencies in the containers.\n\nThe above will:\n\n- start the multiple consul servers in \"different data centers\"\n- start multiple agents simulating real vms with registered service\n- expose the following ports to your host environment:\n    - `8500` - eu-dc\n    - `8501` - eu-dc2\n    - `8502` - us-dc\n    - `8503` - asia-dc\n\n\n\n## Binaries\n\n### fw-manager\n\nThe main binary in this repository responsible for setting iptables rules based on the business logic for specific infrastructure. The binary uses consul catalog to discover infrastructure.\n\nFlags:\n\n- `--dry-run` - Disables the execution step. Program just prints what rules will be deleted and added.\n- `--consul-catalog-file-path` - Specify local file for the consul catalog. If empty catalog will be collected from `https://localhost:8500/...`.\n- `--network-cidr` - Specify the network CIDR which this binary will manage.\n- `--ip-override` - Useful for testing. If empty the binary will search IP assigned to any local interface that belongs to the network specified in `--network-cidr` subnet.\n\n#### Build\n\n```shell\ngo build -o ./fw-firewall cmd/fw-manager/main.go\n```\n\n#### Usage\n\nWith Consul API - Usage on the production\n\n```shell\n./fw-manager\n```\n\nLocally with docker-compose.yaml - Useful for local development\n\nWith consul-api:\n\n```shell\ndocker-compose up -d\n\n./fw-manager --ip-override 10.10.20.1\n```\n\nWith local consul catalog\n```shell\ndocker-compose up -d\n\n./fw-manager --ip-override 10.10.0.17 --consul-catalog-file-path\", \"${workspaceFolder}/services.json\",\n```\n\n### consul-config-gen\n\nSimple helper binary used to bootstrap node in docker.\n\nUsage:\n\n```shell\nconsul-config-gen \\\n    --data-center \"eu-dc1\" \\\n    --data-dir \"/consul-home\" \\\n    --node-name \"node01.eu-dc.metrics.prod\" \\\n    --retry-join-ip \"10.5.0.1\" \\\n    --node-env \"metrics\" \\\n    --node-stage \"prod\"\n```\n\n### consul-svg\n\nBinary that simulate consul service.\n\nUsage:\n\n```shell\nconsul-svc \\\n    --name wireguard \\\n    --env \"metrics\" \\\n    --stage \"prod\" \\\n    --address \"localhost\" \\\n    --port 8081\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel1302%2Ffw-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel1302%2Ffw-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel1302%2Ffw-manager/lists"}