{"id":23375818,"url":"https://github.com/diefans/ferment","last_synced_at":"2025-04-10T18:20:25.593Z","repository":{"id":31236642,"uuid":"34798040","full_name":"diefans/ferment","owner":"diefans","description":"A tool to provide the current docker config in ferm format","archived":false,"fork":false,"pushed_at":"2021-06-09T14:38:16.000Z","size":14,"stargazers_count":11,"open_issues_count":4,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T16:01:28.683Z","etag":null,"topics":["docker","ferm","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/diefans.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-29T14:19:51.000Z","updated_at":"2024-10-01T14:26:13.000Z","dependencies_parsed_at":"2022-09-04T15:24:56.950Z","dependency_job_id":null,"html_url":"https://github.com/diefans/ferment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diefans%2Fferment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diefans%2Fferment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diefans%2Fferment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diefans%2Fferment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diefans","download_url":"https://codeload.github.com/diefans/ferment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248270456,"owners_count":21075794,"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":["docker","ferm","python"],"created_at":"2024-12-21T17:18:42.592Z","updated_at":"2025-04-10T18:20:25.577Z","avatar_url":"https://github.com/diefans.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ferment\n=======\n\n\nObjective\n---------\n\nCreate a ferm_ config for the current docker container setup. This seems useful\nfor automated provisioning of systems (e.g. with ansible_) which want to use\nferm_ for their firewall setup.\n\n\nUsage\n-----\n\nInstall Ferment via `pip`::\n\n    # pip install ferment\n\n\n    # ferment docker --help\n    Usage: ferment docker [OPTIONS] COMMAND [ARGS]...\n\n    Options:\n      -d, --docker PATH     The docker api socket.\n      -c, --cidr TEXT       Docker CIDR.\n      -i, --interface TEXT  Docker interface.\n      --help                Show this message and exit.\n\n    Commands:\n      config\n\nYou just include a callback to ferment within your `ferm.conf`::\n\n    # -*- shell-script -*-\n    #\n    #  Configuration file for ferm(1).\n    #\n\n    table filter {\n        chain INPUT {\n            policy DROP;\n\n            # connection tracking\n            mod state state INVALID DROP;\n            mod state state (ESTABLISHED RELATED) ACCEPT;\n\n            # allow local packet\n            interface lo ACCEPT;\n\n            # respond to ping\n            proto icmp ACCEPT;\n\n            # allow IPsec\n            proto udp dport 500 ACCEPT;\n            proto (esp ah) ACCEPT;\n\n            # allow SSH connections\n            proto tcp dport ssh ACCEPT;\n        }\n        chain OUTPUT {\n            policy ACCEPT;\n\n            # connection tracking\n            #mod state state INVALID DROP;\n            mod state state (ESTABLISHED RELATED) ACCEPT;\n        }\n        chain FORWARD {\n            policy DROP;\n\n            # connection tracking\n            mod state state INVALID DROP;\n            mod state state (ESTABLISHED RELATED) ACCEPT;\n        }\n    }\n\n    @include '/usr/local/bin/ferment docker config|';\n\n\nTodo\n----\n\nSince I am not the great firewall guy, I suppose there are some issues with\nmore complex docker_ setups - I am open for suggestions.\n\n\n.. _ferm: http://ferm.foo-projects.org/\n.. _ansible: http://docs.ansible.com/\n.. _docker: http://docs.docker.com/articles/networking/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiefans%2Fferment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiefans%2Fferment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiefans%2Fferment/lists"}