-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom/change IP address #1455
Comments
Someone already mentioned it in #983 (comment) |
+1 ,now I can only specify the ip of the machine by modifying the ip_addresses column in the machines table via |
|
On the headscale coordination server
On the tailscale client
|
Im my case, I used a more blunt approach to replace my custom tailnet IPV6 range to the standard one. |
While this was closed with a standardised message, I do not believe we will accept this feature for the time being, it does require more thought than it might seem on the surface and we are currently not willing to open this can of worms. People can as mentioned use DB modification if needed, but you should rather base your network of not depending on the assigned IPs. |
This issue is stale because it has been open for 90 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
For anyone trying to backfill IPv6 addresses still on v0.22.3, this works: update machines set ip_addresses = '100.64.0.1,fd7a:115c:a1e0::1' where ip_addresses = '100.64.0.1'; |
newer versions changed the table schema so it's now update nodes set ipv4 = 'desired-ipv4' where ipv4 = 'current-ipv4'; for ipv4 update nodes set ipv6 = 'desired-ipv6' where (...); |
DNS is not always reliable. In my opinion, manually providing a custom IP for infrastructure will be beneficial for maintenance work. |
I know the issue is closed, however if you still Google, you'll probably land here. Here's a quick script to assist those with changing IPs of nodes in headscale If you're like me and not SNATing or OCD I hope you'll appreciate this. https://gist.github.com/Geofferey/e3c49d195a01229e61b878f4530bd052
You'll need The script has several sanity checks to determine if you're on I couldn't have engineers screwing with the DB by hand and there may be a requirement to ensure the IP is controlled since we are full routing across non tailscale nets. We are not using v6 support in our env so I wasn't gonna go the extra mile. |
Perfect timing! I just setup headscale for the first time tonight and wanted to move my exit node to .1! This worked perfectly. Thank you! |
Seeing that all PR's with code to implement this feature contain comments really similar to the "I do not believe we will accept this feature for the time being, it does require more thought than it might seem on the surface and we are currently not willing to open this can of worms." I assume that changing IP's will cause unexpected/buggy behavior that we are missing... For now the only things I can think off are these things:
Is this behavior that you noticed and are there also other problems ? |
(Sorry for joining the discussion late)
You need fixed IPS if the DNS server is hosted inside the tailnet, headscale requires a fixed ip in (of course):
What about an approach similar to DHCP servers? You basically reserve ips to certain nodes.
After headscale reboots, when a node tries to connect, the server checks if it has a reserved ip. If not, it assigns a non-reserved ip. This approach would cut down the complexity of dealing with ip changes, but would still provide the advantage of controlling ips of nodes. |
Headscale is assigning IPs to machines in registering order as x.x.x.1 ... x.x.x.2 ... x.x.x.N.
Is it possible to add a command to assign/change the IP associated with a machine?
The reason is when using script to do automatic job, we can simply use fixed IPs directly.
The text was updated successfully, but these errors were encountered: