8

I'd like to be able to use Back to My Mac over the IPv6 internet. I've already got IPv6 access (i.e. My Airport is assigned a /64 block from my ISP and sends out RAs so everyone on the network can autoconfigure their own public IPv6 addresses. My computer assigns itself both an address based on its MAC address, and a temporary address. I can visit ipv6.google.com and everything.) but for some reason a useless loopback IPv6 address is getting registered with Back to My Mac instead of a useful address.

Here what I get using dns-sd:

dns-sd -F

Timestamp     Recommended Browsing domain
 0:15:52.133  Added     (More)               local
 0:15:52.134  Added                          icloud.com
                                             - > btmm
                                             - - > members
                                             - - - > 12345678

dns-sd -B _services._dns-sd._udp 12345678.members.btmm.icloud.com

Browsing for _services._dns-sd._udp.12345678.members.btmm.icloud.com
Timestamp     A/R Flags if Domain                    Service Type              Instance Name
 0:23:19.685  Add     3  0 .                         _tcp.local.               _rfb
 0:23:19.686  Add     3  0 .                         _tcp.local.               _ssh
 0:23:19.686  Add     3  0 .                         _tcp.local.               _sftp-ssh
 0:23:19.686  Add     2  0 .                         _tcp.local.               _airvideoserver

dns-sd -B _rfb 12345678.members.btmm.icloud.com

Browsing for _rfb._tcp.12345678.members.btmm.icloud.com
Timestamp     A/R Flags if Domain                    Service Type              Instance Name
 0:25:02.255  Add     2  0 12345678.members.btmm.icloud.com. _rfb._tcp.                Mac

dns-sd -L Mac _rfb 12345678.members.btmm.icloud.com

Lookup Mac._rfb._tcp.12345678.members.btmm.icloud.com
 0:26:33.431  Mac._rfb._tcp.12345678.members.btmm.icloud.com. can be reached at Mac.12345678.members.btmm.icloud.com.:5900 (interface 0)

dns-sd -G v6 Mac.12345678.members.btmm.icloud.com.

Timestamp     A/R Flags if Hostname                  Address                                      TTL
 0:27:45.201  Add     2  0 Mac.12345678.members.btmm.icloud.com. FDDC:DBC8:58A7:8322:021F:5BFF:FE3E:3C44%<0>  152

The IPv6 address registered is for ln0, the loopback interface that is useless to anything but the computer running the services. ifconfig lists my IPv6 addresses, including an autoconfigured, temporary, public IPv6 address on my system's real network interface, which would be perfect. Why does dns-sd not register services using this address, and how can I make it do so?

An additional note, my router supports NAT-PMP so even though my computer doesn't directly have a public IPv4 address I'd expect it to use NAT-PMP to make sure services I've enabled are available over IPv4, but this doesn't seem to be the case. When I look up a service instance in the 12345678.members.btmm.icloud.com domain and then use dns-sd -G v4 to resolve the given hostname it says there's no IPv4 record.

1
  • Tangential from the issue at question, the deep detail provides some of the best examples anywhere of precisely how to use dns-sd. MUCH more helpful than the man page!
    – Bill Cole
    May 17, 2013 at 15:21

1 Answer 1

5
+100

It sounds like what you're really looking for is Wide-Area Bonjour (henceforth "WAB"), which is a system where Bonjour-capable clients, in addition to registering their services on the local network via multicast DNS, also use Dynamic DNS Updates (the scheme in the process of being standardized by the IETF in RFC2136), to register not only their IP addresses but also available service records with a traditional unicast DNS server.

See dns-sd.org for instructions on how to configure your Mac to use WAB. They even have a System Preferences panel you can download and install to make it easy. I believe they also have instructions for how to configure WAB to work with some well-known dynamic DNS service providers that support it, such as dyn.com (a.k.a. dyndns.com). If you run your own DNS server somewhere, you can also find instructions on dns-sd.org for how to set up your DNS server to act as a WAB server. For best results, it may need to be running BIND.

Using WAB-supporting dynamic DNS services, or running your own WAB-supporting DNS server, are your only choices. iCloud's BTMM servers do not support full WAB.

Back to My Mac makes use of some of the software infrastructure of Wide-Area Bonjour, but the iCloud BTMM servers don't provide full WAB service, just the parts needed for the particular way BTMM uses it. As you discovered, BTMM client machines put an IPv6 "unique local address" (ULA) on their loopback interfaces, and register that ULA with BTMM's servers. Connections between those ULA's are handled by IPsec-secured, typically IPv6-in-IPv4, tunnels between your BTMM Macs. It's intentional that you cannot connect to those services directly. This forces the connections to go through the IPsec-secured BTMM tunnel. The BTMM software on your Macs handles authenticating your Macs with BTMM and using that to make sure only machines signed into your own BTMM account can establish the BTMM IPsec tunnels.

Update: A couple more thoughts:

  • Make sure you don't have "Block incoming connections" checked in the IPv6 settings of your AirPort Base Station. (Note that AirPort Utility 6.0 doesn't currently have IPv6 settings UI, so you'll have to use AirPort Utility 5.6 or earlier to check this.)
  • Can you ping6 your home Mac's publicly routable, non-temporary IPv6 address from the other site?
  • Does a typical BTMM connection (i.e. over IPv4, from another Mac signed into your same iCloud account, with BTMM enabled) work? Why are you specifically trying to make this happen over IPv6? I might be able to help you better if I understand your goals and constraints better.
5
  • Okay, this is good info. I actually am familiar with dns-sd.org's instructions on setting up and customizing a DNS server for this. Also I had seen that dyndns.org was doing some experimentation a while ago but hadn't taken a look recently. I'm okay with the requirements imposed by BtMM, I just want it to actually work. manual ssh to that ULA times out, Browsing with 'New Remote Connect' shows the service but connecting times out, Trying to connect to the _http service via Bonjour menu in Safari times out.
    – bames53
    Feb 25, 2012 at 2:54
  • I guess I need to find out what could cause connections attempts to that address to always time out even though I obviously can reach the service (since I'm trying this from the local computer).
    – bames53
    Feb 25, 2012 at 2:54
  • @bames53 Ah. One thing that wasn't quite clear to me from your Question was whether you had ever tried a straightforward BTMM connection attempt. It was clear you had (at least outgoing) IPv6 connectivity at home, and a BTMM Mac at home. But what wasn't clear was if you have a BTMM Mac with IPv6 connectivity at another site; which direction you'd tried to make connections; which services you'd tried to use; did a typical IPv6-in-IPv4 BTMM tunnel work?; etc. Update your Question to be more clear on points like that, and if it gives me any further insights, I'll update my Answer too.
    – Spiff
    Feb 25, 2012 at 3:16
  • @bames53 I'm still interested in figuring out exactly what problem you were seeing, so if you want to update your Question to provide more info along the lines I suggested, I'm still eager to try to help.
    – Spiff
    Feb 29, 2012 at 16:09
  • I haven't yet tried a straightforward BtMM connection, since I was testing it from my local network before relying on it working from elsewhere. I'll update you when I have a chance to test that out. I am interested in figuring this out, because even if a connection from a remote network works as expected I'd like to know why iCloud services are visible but not accessible on the local host.
    – bames53
    Feb 29, 2012 at 16:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .