Closed t0rr3sp3dr0 closed 4 years ago
It's important to notice that I'm running the commands inside a docker:19.03-dind-rootless
container on a privileged kubernetes pod.
Please try this sysctl https://github.com/rootless-containers/rootlesskit#distribution-specific-hints
Also please provide version information of your distro and kernel
@AkihiroSuda I had no success in making this work even by following the hints provided.
Host OS: Ubuntu 18.04.5 LTS
Kernel: 5.4.0-1025-aws
Docker: 17.3.2
slirp4netns: 1.1.4
/proc/sys/kernel/unprivileged_userns_clone: 1
/proc/sys/user/max_user_namespaces: 62439
I'm able to reproduce that with Docker Desktop for Mac by running:
docker run --privileged --rm -it alpine
adduser -D user
su user
cd
wget https://github.com/rootless-containers/slirp4netns/releases/download/v1.1.4/slirp4netns-x86_64
chmod +x ./slirp4netns-x86_64
./slirp4netns-x86_64 --mtu 65520 -r 3 --disable-host-loopback $$ tap0
You need to unshare namespaces, please see manpage
It worked, thanks! 😁
When an unprivileged user executes rootlesskit with slirp4netns, network setup fails:
Executing slirp4netns with the arguments used by rootlesskit, we can see the following error:
The same command works just fine when executed by root.