How to change the IP of a device?

Hi. I have 2 devices. One is my laptop, and other is my raspberry pi.
Currently, my laptop has an ip and my pi has
The machine name of my pi that shows on tailscale is raspberrypi
I looked around to see if it was possible to change the ips.
I found this in the documentation: Network access controls (ACLs) · Tailscale
So I edited my ACL accordingly:

But it didnt seem to work. Can anyone help me understand what I am missing :sweat_smile: ? Is it not possible to change IPs? What is the host in ACL for then?

Thank You

I believe the “hosts” section is for creating aliases for use in your ACLs and not for actually assigning IP addresses to specific hosts.

So in your example, you’re not assigning the machine “raspberrypi” to the address, but are saying “If I create an ACL rule which includes the name ‘raspberrypi’ then assume that means the IP”. Think of it as a way to make your ACLs easier to read and understand. So you could add a rule to the ACLs list which says like:

{ “action”: “accept”, “src”: [“autogroup:members”], “dst”: [“raspberrypi:53”] }

And it would allow all members access to on port 53. This gets really handy when you have multiple things you want to allow access to in a single ACL. So if you had multiple rPis, you could make the dst [“raspberrypi:53”, “raspberrypi1:53”, “raspberrypi2:53”] and when you go back to look at it later it makes a lot more sense

Edit: To actually answer your question: I am not sure you can, nor should you need to. With MagicDNS to give friendly names and tags/groups/hosts for ACLs it shouldn’t really matter what internal IP a host gets since it will 1: stay the same for as long as the machine is registered in the tailnet, and 2: be discoverable by the machine’s name in MagicDNS

Oh so I can give my raspberrypi a friendly name to be accessed instead of 100.x.y.z using magicdns? I’ll look into magicdns then. Thank you

Wow magic dns is exactly what I am looking for. Literal magic. Thank you so much!

You’re welcome :slight_smile: Also note that you can specify the machine name by changing it in the TailScale client. On linux, it’s the --hostname option you pass to the “tailscale up” command. That will update the machine’s name in your machine list, and it will be reflected in MagicDNS shortly thereafter. You can also do it via the web UI… click the 3 dots in the upper right of machine you want to change, and select “Edit machine name”.

EDIT: Also, just to be clear, the “hosts” bits in the ACL JSON is unrelated to any of this. That is only defining aliases for use in the ACLs themselves and has no bearing or reliance on the machine names in MagicDNS