You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to follow your "usage" tutorial but get a permission denied when trying to run "slirp4netns --configure --mtu=65520 --disable-host-loopback $(cat /tmp/pid) tap0 starting slirp, MTU=65520" as a non root user
It works when executed as root. The rights to "tun" are already chmod 666. Do you have any advice?
Thanks in advance
The text was updated successfully, but these errors were encountered:
#!/bin/bash
# Ensure /dev/net/tun exists and has correct permissions
if [ ! -e /dev/net/tun ]; then
sudo mkdir -p /dev/net
sudo mknod /dev/net/tun c 10 200
fi
sudo chmod 666 /dev/net/tun
# Add user to the tun group (if it exists)
if grep -q tun /etc/group; then
sudo usermod -aG tun $USER
sudo chown root:tun /dev/net/tun
echo "Added user to the 'tun' group. Please log out and log back in."
else
echo "The 'tun' group does not exist. Creating it..."
sudo groupadd tun
sudo usermod -aG tun $USER
sudo chown root:tun /dev/net/tun
echo "Added user to the 'tun' group. Please log out and log back in."
fi
# Grant CAP_NET_ADMIN capability to slirp4netns
sudo setcap cap_net_admin+ep /usr/bin/slirp4netns
# Run slirp4netns
slirp4netns --configure --mtu=65520 --disable-host-loopback $(cat /tmp/pid) tap0
Hello,
I tried to follow your "usage" tutorial but get a permission denied when trying to run "slirp4netns --configure --mtu=65520 --disable-host-loopback $(cat /tmp/pid) tap0 starting slirp, MTU=65520" as a non root user
It works when executed as root. The rights to "tun" are already chmod 666. Do you have any advice?
Thanks in advance
The text was updated successfully, but these errors were encountered: