-
Notifications
You must be signed in to change notification settings - Fork 177
EPERM with device creation on Darwin #137
Open
Description
Host: Darwin Kernel Version 25.1.0
The code is as follows:
fn main() -> anyhow::Result<()> { let mut config = tun::Configuration::default(); config .address((10, 0, 0, 9)) .netmask((255, 255, 255, 0)) .destination((10, 0, 0, 1)) .up(); let mut dev = tun::create(&config)?; let mut buf = [0; 4096]; loop { let amount = dev.recv(&mut buf)?; println!("{:?}", &buf[0..amount]); } Ok(()) }
Executing as a normal user results in the following error:
Error: Operation not permitted (os error 1)
I could imagine it might work when running as root but I am a bit scared of doing so; however, the documentation is not making any statements about the required privileges.
Activity
Metadata
Metadata
Assignees
Labels
No labels