{"id":13648980,"url":"https://github.com/bowei/k8s-custom-iptables","last_synced_at":"2025-04-22T11:33:29.490Z","repository":{"id":27112175,"uuid":"88560602","full_name":"bowei/k8s-custom-iptables","owner":"bowei","description":"How to add custom iptables rules to a Kubernetes cluster","archived":false,"fork":false,"pushed_at":"2023-10-18T10:15:57.000Z","size":19,"stargazers_count":60,"open_issues_count":6,"forks_count":34,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T16:38:54.803Z","etag":null,"topics":["iptables","k8s","kubernetes","masquerade","nat","networking"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/bowei.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-17T23:40:21.000Z","updated_at":"2024-12-18T18:11:21.000Z","dependencies_parsed_at":"2024-11-09T23:31:26.128Z","dependency_job_id":"e24dc3d2-a321-4fcc-a3d5-0ed34aac73eb","html_url":"https://github.com/bowei/k8s-custom-iptables","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/bowei%2Fk8s-custom-iptables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowei%2Fk8s-custom-iptables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowei%2Fk8s-custom-iptables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowei%2Fk8s-custom-iptables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bowei","download_url":"https://codeload.github.com/bowei/k8s-custom-iptables/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250232610,"owners_count":21396668,"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":["iptables","k8s","kubernetes","masquerade","nat","networking"],"created_at":"2024-08-02T01:04:41.191Z","updated_at":"2025-04-22T11:33:29.127Z","avatar_url":"https://github.com/bowei.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# k8s-custom-iptables\n\nAn example of how to add custom IP tables rules to a Kubernetes cluster.\nThis collection of scripts creates a NAT (MASQ) rule for outbound traffic\nto a TARGETS CIDR range(s) given to the script.\n\n# Installing rules into the cluster.\n\nInstall the daemonset that configures the cluster to NAT an IP range.\n\n```\nTARGETS=\"1.2.3.4/24 4.5.6.7/16\" ./install.sh\n```\n\n# Uninstall rules from the cluster.\n\nUninstall the IP tables rules from the cluster.\n\n```\n./uninstall.sh\n```\n\n# Configuring\nThe configuration for which ranges are NAT'd are in the `k8s-custom-iptables` ConfigMap.\nValues can be changed via `kubectl edit cm/k8s-custom-iptables`:\n\n```\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: k8s-custom-iptables\ndata:\n  nat.rules: \"10.0.0.0/24 192.168.0.0/16\"\n```\n\n# Creating and pushing the image.\n\n```sh\nREGISTRY=gcr.io/my-registry make\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowei%2Fk8s-custom-iptables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbowei%2Fk8s-custom-iptables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowei%2Fk8s-custom-iptables/lists"}