{"id":16887315,"url":"https://github.com/giuseppe/slirp-forwarder","last_synced_at":"2025-10-29T02:03:52.694Z","repository":{"id":149336469,"uuid":"141900757","full_name":"giuseppe/slirp-forwarder","owner":"giuseppe","description":"Create a network namespace for rootless containers.","archived":false,"fork":false,"pushed_at":"2018-07-28T12:30:57.000Z","size":21,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-27T07:46:03.888Z","etag":null,"topics":["network","rootless-containers","slirp"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giuseppe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2018-07-22T14:02:35.000Z","updated_at":"2022-05-06T05:38:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec4d8248-fd5e-4be1-8755-0e9398696bed","html_url":"https://github.com/giuseppe/slirp-forwarder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/giuseppe/slirp-forwarder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppe%2Fslirp-forwarder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppe%2Fslirp-forwarder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppe%2Fslirp-forwarder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppe%2Fslirp-forwarder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giuseppe","download_url":"https://codeload.github.com/giuseppe/slirp-forwarder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppe%2Fslirp-forwarder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281544194,"owners_count":26519554,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"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":["network","rootless-containers","slirp"],"created_at":"2024-10-13T16:43:23.984Z","updated_at":"2025-10-29T02:03:52.676Z","avatar_url":"https://github.com/giuseppe.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"slirp-forwarder\n===============\n\nA tool to create a network namespace that targets rootless containers.\n\nSliRP emulates in userspace a TCP/IP stack.  It can be used to\ncircument the limitation of creating TAP/TUN devices in the host\nnamespace for an unprivileged user.\n\n*slirp-forwarder* runs in the host network namespace without requiring\nroot privileges or a suid program to configure the network.  A TAP\ndevice is created inside a new network namespace.  Data is shuttled\nfrom the TAP device to the SLiRP stack running outside.\n\nNotes\n======\nI've stopped working on this project as I've found that @AkihiroSuda\nhad already something similar so we joined our efforts in:\n[slirp4netns](https://github.com/rootless-containers/slirp4netns)\n\nRequirements\n============\nslirp-forwarder internally uses [libslirp](https://github.com/rd235/libslirp),\nit is required for the build.\n\nUsage\n======\n*slirp-forwarder* creates a new network namespace, configures a tap\ndevice and keeps a reference to it in the specified.\n\n```console\n$ slirp-forwarder /path/to/net\n```\n\nFor unprivileged users, before using *slirp-forwarder* it is first\nnecessary to run in a new user and mount namespace.\n\nYou can use the standard `unshare(1)` tool for doing it, or if you'd\nlike to get more users mapped into the namespace, you can use\n[become-root](https://github.com/giuseppe/become-root).\n\n```console\n$ unshare -mr bash # start a new bash in a mount and user namespace\n$ mount -t tmpfs tmpfs /var/run; mkdir -p /var/run/NetworkManager/\n$ touch net; slirp-forwarder net \u0026 # keep a reference in the file net\n$ nsenter --net=net dhclient -i tap0\n$ nsenter --net=net route add default tap0\n$ nsenter --net=net ifconfig -a\nlo: flags=8\u003cLOOPBACK\u003e  mtu 65536\n        loop  txqueuelen 1000  (Local Loopback)\n        RX packets 0  bytes 0 (0.0 B)\n        RX errors 0  dropped 0  overruns 0  frame 0\n        TX packets 0  bytes 0 (0.0 B)\n        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\n\ntap0: flags=67\u003cUP,BROADCAST,RUNNING\u003e  mtu 1500\n        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255\n        inet6 fe80::e00f:e4ff:fe83:29cc  prefixlen 64  scopeid 0x20\u003clink\u003e\n        ether e2:0f:e4:83:29:cc  txqueuelen 1000  (Ethernet)\n        RX packets 2  bytes 724 (724.0 B)\n        RX errors 0  dropped 0  overruns 0  frame 0\n        TX packets 9  bytes 942 (942.0 B)\n        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\n$ nsenter --net=net wget -O- www.gnu.org\n....\n```\n\nBuild\n=====\nAfter you have installed libslirp:\n    \n```console\n$ ./autogen.sh \u0026\u0026 ./configure \u0026\u0026 make\n```\n\nTODO\n====\nConsider the slirp implementation in QEMU.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuseppe%2Fslirp-forwarder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiuseppe%2Fslirp-forwarder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuseppe%2Fslirp-forwarder/lists"}