[GH-ISSUE #6077] landlock: restrict tcp sockets #3174

Open
opened 2026-05-05 09:47:56 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @osevan on GitHub (Nov 3, 2023).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6077

I hope everyone with eye on landlock functionality could plant this feature as fast as possible inside firejail.

https://www.phoronix.com/news/Landlock-Networking-Linux-6.7

Thanks and

Best regards

Originally created by @osevan on GitHub (Nov 3, 2023). Original GitHub issue: https://github.com/netblue30/firejail/issues/6077 I hope everyone with eye on landlock functionality could plant this feature as fast as possible inside firejail. https://www.phoronix.com/news/Landlock-Networking-Linux-6.7 Thanks and Best regards
gitea-mirror added the
enhancement
networking
labels 2026-05-05 09:47:56 -06:00
Author
Owner

@rusty-snake commented on GitHub (Nov 3, 2023):

For landlock I would say we should deny to bind to any tcp port and allow to connect to all tcp ports.

For fine grained control options we could use landlock.bind-tcp/landlock.connect-tcp (or namespaced landlock[.net].tcp.bind / landlock[.net].bind) or a implementation free name line whitelist-tcp-bind/whitelist-tcp-connect (systemd uses SocketBindAllow/SocketBindDeny implemented with cgroup/bind[46]).

We should also ask whether exposing those low-level options make sense for firejail. While restricting bind sounds interesting, restricting connect for tcp connections could give a lot users a false-sense of security(/privacy) unless other layer 4 protocols (udp and the like) are blocked by other means (seccomp/cgroup/ebpf/nftables/netfilter).

<!-- gh-comment-id:1792615875 --> @rusty-snake commented on GitHub (Nov 3, 2023): For `landlock` I would say we should deny to bind to any tcp port and allow to connect to all tcp ports. For fine grained control options we could use `landlock.bind-tcp`/`landlock.connect-tcp` (or namespaced `landlock[.net].tcp.bind` / `landlock[.net].bind`) or a implementation free name line `whitelist-tcp-bind`/`whitelist-tcp-connect` (systemd uses `SocketBindAllow`/`SocketBindDeny` implemented with `cgroup/bind[46]`). We should also ask whether exposing those low-level options make sense for firejail. While restricting `bind` sounds interesting, restricting `connect` for tcp connections could give a lot users a false-sense of security(/privacy) unless other layer 4 protocols (udp and the like) are blocked by other means (seccomp/cgroup/ebpf/nftables/netfilter).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3174
No description provided.