Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

The VPN software I use for work (IPSecuritas) requires me to turn off Back To My Mac to start it's connection, so I frequently turn off Back To My Mac in order to use my VPN connection (the program does this for me). I forget to turn it back on however and I'd love to know if there was something I could run (script, command) to turn it back on.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

There is no supported way to do this. Having said that, you can do it using scutil:

louis@Arios:~$ sudo scutil 
> set Setup:/Network/BackToMyMac
> d.add <YYY>  <XXX>.members.btmm.icloud.com
> set Setup:/Network/BackToMyMac
> quit
louis@Arios:~$ 

Replacing <YYY> with the UID of the user account on the system (for most people with single account that is 501), and <XXX> with your iCloud account number. If you don't know that you can check your dns-sd registrations:

louis@Arios:~$  dns-sd -E
Looking for recommended registration domains:
 DATE: ---Wed 22 Aug 2012---
 9:11:04.789  ...STARTING...
Timestamp     Recommended Registration domain
 9:11:04.789  Added     (More)               local
 9:11:04.789  Added                          icloud.com
                                             - > btmm
                                             - - > members
                                             - - - > <XXX>

The last line will list your iCloud user number. I think they are all 8 digit numbers, at least mine is.

share|improve this answer
    
Nice work! I thought for sure the solution would have used defaults –  Nick Aug 17 '10 at 22:50
    
You can do it using default to modify the underlying file ` /library/preferences/systemconfiguration/preferences.plist`, but the daemon running in the background won't pick it up, so you will need to kick configd and possible some other stuff after you do that. They all are signed up for a notification off the system config framework, so if you use that (which scutil does) it posts the notification after it does the equivalent of a defaults write. –  Louis Gerbarg Aug 18 '10 at 0:27
    
Thanks a ton! Of note, this method doesn't allow me to see the other computers on the computer this is run on but works in order to see that computer which is precisely what I need. Of note, it doesn't even need you to be signed into MobileMe. This is a crosspost from Super User - if you'd like to answer it there as well. –  Chealion Aug 18 '10 at 2:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.