Skip to content

Commit f89609d

Browse files
authored
feat(errors/tun): add faster way to allow /dev/net/tun access with SELinux (#183)
1 parent 7386700 commit f89609d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

errors/tun.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,15 @@ Thanks to [@Vendetta1985](https://github.com/Vendetta1985), [source comment](htt
6464
6565
## `TUN device is not available: open /dev/net/tun: permission denied`
6666
67-
This can happen with `podman`, usually due to SELinux. Create a SELinux policy to allow the rootless container to use the `/dev/net/tun` device.
67+
This can happen with `podman`, usually due to SELinux, which prevents rootless container access to the `/dev/net/tun` device by default.
68+
69+
The quick-and-dirty path to do this is to reconfigure `container_use_devices` using:
70+
71+
```bash
72+
podman machine ssh "sudo setsebool -P container_use_devices=true"
73+
```
74+
75+
Alternatively, you can create a SELinux policy for finer control:
6876

6977
1. Copy the content below to a new file `gluetun_policy.te`
7078

0 commit comments

Comments
 (0)