Description
When running greywall -- opencode, the sandbox blocks TUN device creation and RTNETLINK operations, preventing opencode from setting up its networking:
RTNETLINK answers: Operation not permitted
ioctl(TUNSETIFF): Operation not permitted
Cannot find device "tun0"
Cannot find device "tun0"
Cannot find device "tun0"
ERROR 2026-03-24T22:01:37 +62ms service=models.dev error=Unable to connect. Is the computer able to access the url? Failed to fetch models.dev
Root cause
This appears to be caused by AppArmor restricting the ioctl(TUNSETIFF) and RTNETLINK operations inside the bubblewrap sandbox. The tool tries to create a TUN device for its own networking, which AppArmor denies.
Reference: https://docs.monadical.com/j0hgdOyRQea_f8SWIYJwPw#
Environment
- greywall v0.2.8
- greyproxy v0.3.2
- Linux kernel 6.17
- Platform: linux
Steps to reproduce
greywall check (all checks pass)
greywall -- opencode
- Observe TUN/RTNETLINK errors and network failure
Expected behavior
opencode should be able to reach the network through greyproxy's SOCKS5 proxy without needing to create a TUN device, or AppArmor should allow the necessary operations for tools that require TUN devices.
Description
When running
greywall -- opencode, the sandbox blocks TUN device creation and RTNETLINK operations, preventing opencode from setting up its networking:Root cause
This appears to be caused by AppArmor restricting the
ioctl(TUNSETIFF)and RTNETLINK operations inside the bubblewrap sandbox. The tool tries to create a TUN device for its own networking, which AppArmor denies.Reference: https://docs.monadical.com/j0hgdOyRQea_f8SWIYJwPw#
Environment
Steps to reproduce
greywall check(all checks pass)greywall -- opencodeExpected behavior
opencode should be able to reach the network through greyproxy's SOCKS5 proxy without needing to create a TUN device, or AppArmor should allow the necessary operations for tools that require TUN devices.