{"id":29123064,"url":"https://github.com/maxsans/container-netif-binder","last_synced_at":"2026-05-01T17:36:20.200Z","repository":{"id":301524461,"uuid":"1009522499","full_name":"maxsans/container-netif-binder","owner":"maxsans","description":"Bind a physical network interface to a container (e.g. Docker) and configure it directly from the host. Includes allocation and recovery scripts.","archived":false,"fork":false,"pushed_at":"2025-06-27T09:23:49.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T21:40:54.453Z","etag":null,"topics":["bash","container","docker","linux","netns","networking","physical-interface","scripts"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/maxsans.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,"zenodo":null}},"created_at":"2025-06-27T09:13:28.000Z","updated_at":"2025-06-27T09:26:06.000Z","dependencies_parsed_at":"2025-06-27T10:28:07.576Z","dependency_job_id":"6e8c27f8-0e2a-4ce8-96b4-ad66f191bb90","html_url":"https://github.com/maxsans/container-netif-binder","commit_stats":null,"previous_names":["maxsans/container-netif-binder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxsans/container-netif-binder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxsans%2Fcontainer-netif-binder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxsans%2Fcontainer-netif-binder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxsans%2Fcontainer-netif-binder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxsans%2Fcontainer-netif-binder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxsans","download_url":"https://codeload.github.com/maxsans/container-netif-binder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxsans%2Fcontainer-netif-binder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32507091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["bash","container","docker","linux","netns","networking","physical-interface","scripts"],"created_at":"2025-06-29T18:05:36.806Z","updated_at":"2026-05-01T17:36:19.760Z","avatar_url":"https://github.com/maxsans.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# container-netif-binder\n\n**Bind and unbind physical network interfaces to Linux containers (e.g. Docker) using native network namespaces.**\n\n## Overview\n\nThis project provides portable Bash scripts to:\n- Assign a physical interface (like `eth1`) to a container's network namespace.\n- Reclaim the interface from the container back to the host.\n\nThese scripts are based on Linux network namespaces and are container runtime–agnostic (Docker, Podman, etc.).\n\n---\n\n## Requirements\n\n- Linux system (with `iproute2`)\n- Root privileges (`sudo`)\n- Docker installed (for default usage)\n\n---\n\n## Files\n\n### `scripts/assign-interface.sh`\n\nAssign a physical network interface to a container and configure it with a static IP.\n\n```bash\nsudo ./scripts/assign-interface.sh \u003ccontainer_name\u003e \u003chost_interface\u003e \u003ccontainer_interface\u003e \u003cip_address\u003e \u003cnetmask\u003e\n````\n\n**Example:**\n\n```bash\nsudo ./scripts/assign-interface.sh mycontainer eth1 net1 192.168.1.100 24\n```\n\n---\n\n### `scripts/reclaim-interface.sh`\n\nReclaim the interface from the container back to the host.\n\n```bash\nsudo ./scripts/reclaim-interface.sh \u003ccontainer_name\u003e \u003cinterface_name_in_container\u003e\n```\n\n**Example:**\n\n```bash\nsudo ./scripts/reclaim-interface.sh mycontainer net1\n```\n\n---\n\n## Notes\n\n* The container must be running.\n* It’s recommended to start it with `--network=none` to avoid interference from default Docker networking.\n* You can use this on **any container** if you know the container’s **PID** and it exposes a Linux netns.\n\n---\n\n## Examples\n\nSee [`examples/usage.md`](examples/usage.md) for a full Docker setup walkthrough.\n\n---\n\n## 🛡 License\n\nMIT — see [LICENSE](LICENSE)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxsans%2Fcontainer-netif-binder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxsans%2Fcontainer-netif-binder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxsans%2Fcontainer-netif-binder/lists"}