Skip to content

Commit

Permalink
fix(headscale): Add internal ingress to ACL
Browse files Browse the repository at this point in the history
  • Loading branch information
eaglesemanation committed Feb 2, 2025
1 parent 4623853 commit 809c001
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 16 deletions.
56 changes: 41 additions & 15 deletions k8s/apps/network/headscale/acl.jsonc
Original file line number Diff line number Diff line change
@@ -1,18 +1,44 @@
{
"groups": {
"group:admin": ["eaglesemanation"],
},
"tagOwners": {
"tag:exit-node": ["group:admin"],
},
"autoApprovers": {
"exitNode": ["tag:exit-node"],
},
"acls": [
{
"action": "accept",
"src": ["*"],
"dst": ["tag:exit-node:0", "autogroup:internet:*"],
"groups": {
"group:admin": [
"eaglesemanation"
],
"group:internal": [
"eaglesemanation",
"laser532"
],
},
],
"tagOwners": {
"tag:exit-node": [
"group:admin"
],
},
"autoApprovers": {
"exitNode": [
"tag:exit-node"
],
},
"acls": [
{
"action": "accept",
"src": [
"*"
],
"dst": [
"tag:exit-node:0",
"autogroup:internet:*",
],
},
{
"action": "accept",
"src": [
"group:internal"
],
"dst": [
"tag:exit-node:*",
"${SVC_DNS_ADDR}/32:53",
"${SVC_INGRESS_INTERNAL_ADDR}/32:80,443"
],
},
],
}
11 changes: 10 additions & 1 deletion k8s/apps/network/headscale/deployment.k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,23 @@ spec:
app.kubernetes.io/instance: tailscale-exit-node
spec:
serviceAccountName: tailscale-exit-node
initContainers:
- name: sysctler
image: docker.io/library/busybox:1.37.0
securityContext:
privileged: true
command: ["/bin/sh"]
args:
- -c
- sysctl -w net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1
containers:
- name: tailscale
image: ghcr.io/tailscale/tailscale:v1.78.3
env:
- name: TS_USERSPACE
value: "false"
- name: TS_EXTRA_ARGS
value: "--advertise-tags=tag:exit-node --advertise-exit-node --login-server=https://headscale.${CLUSTER_DOMAIN}"
value: "--advertise-tags=tag:exit-node --advertise-routes=192.168.25.0/24 --advertise-exit-node --login-server=https://headscale.${CLUSTER_DOMAIN}"
- name: TS_KUBE_SECRET
value: tailscale-exit-node-state
- name: TS_HOSTNAME
Expand Down

0 comments on commit 809c001

Please sign in to comment.