Two of my Tailscale devices have the same IP address. Why? - tailscale

I have an existing macOS laptop, and I got a new laptop and installed Tailscale on it as well. But, when it connects to my tailnet, it has the same Tailscale IP address, which makes it hard to manage ACLs and sharing.
How do I fix it?

This can happen if you use backups to restore or replicate one device to another, e.g., restore iPhone from iCloud backup.
What happens is that the device key, stored locally on the device, is copied to the new device, and used by Tailscale (even if Tailscale has never been installed on the new device before).
See https://tailscale.com/kb/1023/troubleshooting/#two-of-my-devices-have-the-same-100x-ip-address
To fix this, uninstall Tailscale from the device, and remove its device key. On a Mac, remove the keys tailscale-machinekey, tailscale-logdta and tailscale-preferences in Keychain Access. Then, you can reinstall Tailscale and a new machine key will be generated for that device.
See https://tailscale.com/kb/1069/uninstall/ for uninstall instructions.

Related

How to check if iPhone is jailbroken or not, from terminal on a Mac?

I would like to execute some scripts on my Mac, to which an iOS device is connected. The intent of the script would be to identify whether the connected device is jailbroken or not. Would be great if you could suggest the solution using bash or py.
You can attempt to SSH into it via the iPhone's connection program "usbmux" (to forward the wired data connection to a port on your computer). There is a script, as well as instructions on this GitHub page
Try this https://github.com/libimobiledevice/ifuse You can check if device allows you to access it's root folder. If you can access root folder then it's definitely jailbroken.
It's true that jailbreak doesn't necessarily mean you can access it's entire filesystem but all modern jailbreak solutions install AFC2 service which allows full filesystem access.

Get iPhone app to iPod from remote machine for testing

My problem is - I work on a remote mac through Remote Desktop Connection - from a windows host.
I have my app ready on remote mac.
I have my iPod with me, connected to my windows host.
How do I get this app onto my device for testing purpose?
My access to the mac is through RDP.
I edited the rdp connection to allow local usb access to my remote mac, (remotely) hoping that my mac would see it as a device. But it didn't.
Is there any way it would see my iPod?
(I already read this and it requires mac-to-ipod direct connection.)
Or is there any other path I can get my app package on my device for testing through windows machine?
Firstly you will have to add your iPod to the developer portal if you haven't already. Next you can do a build and archive which will export your app into organiser. Click on the app version in organiser and click the distribute button and make sure you select ad-hoc distribution. This will give you a .app packaged version of your app which can then be sent across to your windows machine from your remote desktop where you can then drag it into iTunes and install it on your iPod.
If you are testing lots of different builds of your app over a short space of time then i would suggest using test flight, which can be found easily when googled. It allows you to upload versions of your app through and ad-hoc .app package which ca then be installed across all your devices using the test flight app on your phone. I would only recommend doing this if you are doing lots of builds and testing on lots of devices though.
Hope this helps
Sam

iOS Sync & Backup

Given a jailbroken iPhone and iPad, various windows machines, and a possible shared web host environment, how would I setup the iphone/iPad to automatically sync a folder of files, such that modifying the files or adding on the iPad would result in them being updated/added on the iphone within the file system ( assuming wifi/internet connection)?
I have SSH on both devices, and Im not fussed on wether the latest and greatest version of the file needs to be on a local desktop/laptop or remote host, so long as when the iPad and the iPhone come into contact on the wifi network, the two copy over the latest version of the file.
I am aware of tutorials using rsync, but this would require me to manually perform the operation, and I would like to automate this as much as is possible
You could start with dropping rsync in favor of unison, which is quite good at syncing files "the right way". It doesn't matter on which host you fire it up, it makes sure both have the most recent versions.
It also can use ssh natively. But you would need to get or build a version for the iPhone.
With that in place, set up RSA authentication (copy public key to otherhost:~/.ssh/authorized_keys2), and let the phone fire up unison every once in a while (using cron), or when the wifi fires up. (maybe find the iOS equivalent of post-up on the wifi interface)

One iPhone, two developer machines

I switch between my iMac and MacBook when working on my apps. I've always used my iMac to test the apps on the actual device, but I would like to be able to do this from both computers. I cannot seem to use the profile on my MacBook as it does not have the correct Certificate Signing Request in the KeyChain. Is there a way to copy these between machines and KeyChains?
To export the certificate, see here.
In short, enter this into the terminal:
sudo /Applications/Utilities/Keychain\ Access.app/Contents/MacOS/Keychain\ Access
This will require your password. Once the Keychain opens, you'll be able to export the certificate along with the private key.
This has been simplified for IOS4. All you need to do now is go to the organizer and export the profile you need and then import on the other machine.
iOS4 Guide - Managing your devices

Can I test an iPhone app on a device synced with another computer?

Is it possible to test an iPhone app on an iPhone/iPod touch which is synced to a computer other than the host computer?
If so, will this also work for testing a device which is synced to a Windows machine?
I don't see why not. You do need to register the device to do any testing at all though. Here is a good tutorial for how to do that.
Update: I tried it yesterday and it worked just fine.
You definitely can. With XCode 3.2.3 it's pretty easy now--you can dynamically load the provisioning certificate to the phone. To do this, plug in the phone that you want to use via USB, open the Organizer in XCode, and follow the instructions for provisioning the device. You must be connected to the internet.
Note: if there are new developers agreements from Apple that you haven't accepted yet, this certificate provisioning step may fail silently.