Default to a FilterDenyAll instead of tailcfg.FilterAllowAll if no acl policy defined #663

Closed
opened 2025-12-29 02:21:45 +01:00 by adam · 1 comment
Owner

Originally created by @andy-netltd on GitHub (Mar 6, 2024).

Why

If no acl policy is defined then headscale defaults to tailcfg.FilterAllowAll which allows all devices visibility of all other devices and the ability to communicate with them on any protocol. This complete openness does not appear to fit with a zero trust network design. A more robust default security response that locks down device visibility and communication would be a more appropriate response.

Description

Proposal is to do following in hscontrol > policy > acts.go:

  • add a new tailcfg.FilterRule of FilterDenyAll (as no appropriate policy appears to be available within tailscale);
  • update the GenerateFilterAndSSHRules so that if there is no policy defined headscale now:
    • logs a warning message of Default deny all ACL rules being applied;
    • defaults to the FilterDenyAll rather than tailcfg.FilterAllowAll.

The proposed FilterDenyAll would be:

var FilterDenyAll = []tailcfg.FilterRule{
	{
		SrcIPs:  []string{},
		SrcBits: nil,
	},
}
Originally created by @andy-netltd on GitHub (Mar 6, 2024). ## Why If no acl policy is defined then headscale defaults to `tailcfg.FilterAllowAll` which allows all devices visibility of all other devices and the ability to communicate with them on any protocol. This complete openness does not appear to fit with a zero trust network design. A more robust default security response that locks down device visibility and communication would be a more appropriate response. ## Description Proposal is to do following in `hscontrol > policy > acts.go`: - add a new `tailcfg.FilterRule` of `FilterDenyAll` (as no appropriate policy appears to be available within tailscale); - update the `GenerateFilterAndSSHRules` so that if there is no policy defined headscale now: - logs a warning message of `Default deny all ACL rules being applied`; - defaults to the `FilterDenyAll` rather than `tailcfg.FilterAllowAll`. The proposed `FilterDenyAll` would be: ``` var FilterDenyAll = []tailcfg.FilterRule{ { SrcIPs: []string{}, SrcBits: nil, }, } ```
adam added the enhancement label 2025-12-29 02:21:45 +01:00
adam closed this issue 2025-12-29 02:21:45 +01:00
Author
Owner

@kradalby commented on GitHub (Mar 6, 2024):

Tailscale has a default allow policy and we will adhere to the same as upstream.

@kradalby commented on GitHub (Mar 6, 2024): Tailscale has a default allow policy and we will adhere to the same as upstream.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#663