tailscale-prefix-mover

command module
v0.0.0-...-de62a10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

README

tailscale-prefix-mover

Provide a set of prefixes within 100.60.0.0/10 and this tool will find devices within those prefixes and reassign devices to other space within the CGNAT prefix.

See Visual Subnet Calculator for an easy subnet calculator.

Usage

go run github.com/clstokes/tailscale-prefix-mover -help
Example

Pass -apply to make changes.

export TAILSCALE_TAILNET=...
export TAILSCALE_API_KEY=...

go run github.com/clstokes/tailscale-prefix-mover -from-prefixes=100.72.0.0/13,100.96.0.0/11
Moving devices from [100.72.0.0/13 100.96.0.0/11] to [100.64.0.0/13 100.80.0.0/12]
Setting v4 address [v.x.y.z  ] to [nodeid:1234567890   / name:device123.example.ts.net]... done.
Setting v4 address [v.x.y.z  ] to [nodeid:9876543210   / name:device987.example.ts.net]... done.
Pass -apply to make changes.
Done.
Example with -to-prefixes

Pass -apply to make changes.

export TAILSCALE_TAILNET=...
export TAILSCALE_API_KEY=...

go run github.com/clstokes/tailscale-prefix-mover -from-prefixes=100.72.0.0/13,100.96.0.0/11 -to-prefixes=100.64.0.0/24
Moving devices from [100.72.0.0/13 100.96.0.0/11] to [100.64.0.0/24]
Setting v4 address [v.x.y.z  ] to [nodeid:1234567890   / name:device123.example.ts.net]... done.
Setting v4 address [v.x.y.z  ] to [nodeid:9876543210   / name:device987.example.ts.net]... done.
Pass -apply to make changes.
Done.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL