Is IPv6 subnet route (4via6) support? #323

Closed
opened 2025-12-29 01:26:58 +01:00 by adam · 2 comments
Owner

Originally created by @starskyzheng on GitHub (Sep 8, 2022).

When trying to ping over 4via6 route, i got 'no matching peer'.
4via6 is convenient for management many internal networks with overlapped ip address.
The router subnet were enabled using headscale cli.
The same config for tailscale is worked, but when i changed to headscale it was broken.

detail about 4via6:
https://tailscale.com/kb/1201/4via6-subnets/?q=ipv6#step-1-generate-the-ipv6-subnet-route

For router:
tailscale up --advertise-exit-node --advertise-routes fd7a:115c:a1e0:b1a:0:1:c0a8:0/120,192.168.7.0/24 --accept-routes --login-server=https://headscale.xx.com:8888 --reset

For client:
tailscale up --advertise-exit-node -accept-routes --login-server=https://headscale.xx.com:8888 --reset
tailscale ping fd7a:115c:a1e0:b1a:0:2:192.168.7.140
ping fd7a:115c:a1e0:b1a:0:2:192.168.7.140

Originally created by @starskyzheng on GitHub (Sep 8, 2022). When trying to ping over 4via6 route, i got 'no matching peer'. 4via6 is convenient for management many internal networks with overlapped ip address. The router subnet were enabled using headscale cli. The same config for tailscale is worked, but when i changed to headscale it was broken. detail about 4via6: https://tailscale.com/kb/1201/4via6-subnets/?q=ipv6#step-1-generate-the-ipv6-subnet-route For router: tailscale up --advertise-exit-node --advertise-routes fd7a:115c:a1e0:b1a:0:1:c0a8:0/120,192.168.7.0/24 --accept-routes --login-server=https://headscale.xx.com:8888 --reset For client: tailscale up --advertise-exit-node -accept-routes --login-server=https://headscale.xx.com:8888 --reset tailscale ping fd7a:115c:a1e0:b1a:0:2:192.168.7.140 ping fd7a:115c:a1e0:b1a:0:2:192.168.7.140 <!-- Please add relevant information about your system. For example: - Version of headscale used: 0.16.4 - Version of tailscale client: 1.30.0 - OS (e.g. Linux, Mac, Cygwin, WSL, etc.) and version: linux centos8 - Kernel version: 4.18.0-348.7.1.el8_5.x86_64 - The relevant config parameters you used - Log output -->
adam added the bug label 2025-12-29 01:26:58 +01:00
adam closed this issue 2025-12-29 01:26:59 +01:00
Author
Owner

@madjam002 commented on GitHub (Sep 8, 2022):

4via6 subnets work fine with Headscale so this isn't a bug, although Headscale currently can't have IPv6 rules written as bare hosts in the ACL rules (this is a separate bug), which means it's a bit more difficult to get the correct peermap sent down to the clients.

The only way I could find to make it work is to have a host in your hosts section of the ACL, like so:

"hosts": {
  "somehost": "fd7a:115c:a1e0:b1a:0:1:c0a8:1/128"
}

and then use that host in an ACL rule:

{
  "action": "accept",
  "src": [...],
  "dest": ["somehost:*"]
}

Having the IPv6 CIDR bare in the ACL rule dest won't work, it has to be in a host alias.

@madjam002 commented on GitHub (Sep 8, 2022): 4via6 subnets work fine with Headscale so this isn't a bug, although Headscale currently can't have IPv6 rules written as bare hosts in the ACL rules (this is a separate bug), which means it's a bit more difficult to get the correct peermap sent down to the clients. The only way I could find to make it work is to have a host in your `hosts` section of the ACL, like so: ``` "hosts": { "somehost": "fd7a:115c:a1e0:b1a:0:1:c0a8:1/128" } ``` and then use that host in an ACL rule: ``` { "action": "accept", "src": [...], "dest": ["somehost:*"] } ``` Having the IPv6 CIDR bare in the ACL rule `dest` won't work, it has to be in a host alias.
Author
Owner

@starskyzheng commented on GitHub (Sep 9, 2022):

Thanks

@starskyzheng commented on GitHub (Sep 9, 2022): Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#323