[GH-ISSUE #2371] Fine grained ACL policies for SSH #5016

Closed
opened 2026-08-05 01:00:53 -04:00 by saavagebueno · 4 comments
Owner

Originally created by @alexcupertme on GitHub (Aug 1, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2371

Originally assigned to: @nazarewk on GitHub.

Is your feature request related to a problem? Please describe.
ACL policies for SSH. AFAIK, best way i can implement it now, to restrict Netbird SSH port (44338)

Describe the solution you'd like
Something like Tailscale has https://tailscale.com/kb/1193/tailscale-ssh

We need to configure which user group has SSH access to the hosts

When creating policies, we can choose protocol. SSH option would fit well here, even though it is a different OSI network level.

Describe alternatives you've considered

Additional context

Originally created by @alexcupertme on GitHub (Aug 1, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2371 Originally assigned to: @nazarewk on GitHub. **Is your feature request related to a problem? Please describe.** ACL policies for SSH. AFAIK, best way i can implement it now, to restrict Netbird SSH port (44338) **Describe the solution you'd like** Something like Tailscale has https://tailscale.com/kb/1193/tailscale-ssh We need to configure which user group has SSH access to the hosts When creating policies, we can choose protocol. SSH option would fit well here, even though it is a different OSI network level. **Describe alternatives you've considered** - **Additional context** -
saavagebueno added the feature-requestsecurityacl labels 2026-08-05 01:00:53 -04:00
Author
Owner

@jakob1379 commented on GitHub (Mar 11, 2025):

Just to chip in here.

This would also improve the current state where I can become any user on the remote, even the root user. This seems like a fairly big concern in terms of using netbird to manage ssh access.

<!-- gh-comment-id:2714464698 --> @jakob1379 commented on GitHub (Mar 11, 2025): Just to chip in here. This would also improve the current state where I can become any user on the remote, even the root user. This seems like a fairly big concern in terms of using netbird to manage ssh access.
Author
Owner

@nazarewk commented on GitHub (Mar 11, 2025):

I have confirmed with the developer: it indeed works as designed, exactly the way you described.

You can take the following actions to mitigate:

  1. Not use SSH at all (it needs to be enabled on both the management and the client side at the same time),
  2. Run in a rootless container (yeah, probably not particularly useful)
  3. Run the daemon as an unprivileged user (I'll need to confirm it is indeed preventing logging in as root), you can find a hardened setup directions at the NixOS module I wrote (disclaimer: this is not an officially supported way of running Netbird)

I will get back to you with more information when I obtain it.

<!-- gh-comment-id:2714686498 --> @nazarewk commented on GitHub (Mar 11, 2025): I have confirmed with the developer: it indeed works as designed, exactly the way you described. You can take the following actions to mitigate: 1. Not use SSH at all (it needs to be enabled on both the management and the client side at the same time), 2. Run in a rootless container (yeah, probably not particularly useful) 3. Run the daemon as an unprivileged user (I'll need to confirm it is indeed preventing logging in as root), you can find a hardened setup directions at [the NixOS module I wrote](https://github.com/NixOS/nixpkgs/blob/10069ef4cf863633f57238f179a0297de84bd8d3/nixos/modules/services/networking/netbird.nix#L547-L607) (disclaimer: this is not an officially supported way of running Netbird) I will get back to you with more information when I obtain it.
Author
Owner

@nazarewk commented on GitHub (Mar 11, 2025):

FYI: this issue will be addressed as a part of larger SSH optimization effort

<!-- gh-comment-id:2715027492 --> @nazarewk commented on GitHub (Mar 11, 2025): FYI: this issue will be addressed as a part of larger SSH optimization effort
Author
Owner

@jnfrati commented on GitHub (May 7, 2026):

Closing this as SSH is officially supported by ACL Policies 👍

https://docs.netbird.io/manage/peers/ssh#step-2-create-access-control-policy

Yet if the current behavior still don't match what you were expecting feel free to open a new feature request or an issue and we'll take a look!

<!-- gh-comment-id:4396608149 --> @jnfrati commented on GitHub (May 7, 2026): Closing this as SSH is officially supported by ACL Policies 👍 https://docs.netbird.io/manage/peers/ssh#step-2-create-access-control-policy Yet if the current behavior still don't match what you were expecting feel free to open a new [feature request or an issue](https://github.com/netbirdio/netbird/discussions/new/choose) and we'll take a look!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#5016