remotely wake a sleeping Mac

Discussion in 'Mac Basics and Help' started by g-boac, Mar 22, 2009.

  1. g-boac macrumors 6502

    Joined:
    Oct 7, 2007
    #1
    How can I remotely wake a sleeping Mac?

    For example, if I have .mac/Mobile-Me "Back to My Mac" set up on my home iMac and work MacBook, and I am on the road, is there a way for me to wake the sleeping iMac remotely, either via "Back to My Mac", or a Terminal command?

    thanks,
    Mark
     
  2. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #2
    How is the network set up, wired or wireless?
     
  3. jamesarm97 macrumors 65816

    Joined:
    Sep 29, 2006
    #3
    You can if wired and you have another computer or server running on the same network. I'm not sure if wakeonlan works from another subnet. I have done it before, but I have a linux server always running and ssh into it and issue the wake command.
     
  4. Beerfloat macrumors regular

    Beerfloat

    Joined:
    Feb 21, 2009
    #4
    You can also set up a port forward (or 'PAT') mapping of incoming traffic on your router on UDP port 9 to the broadcast address of your subnet, if your router supports that. Then you can use the wakonlan utility over the Internet.
     
  5. g-boac thread starter macrumors 6502

    Joined:
    Oct 7, 2007
    #5
    wireless, via AEBS but I can just as easily connect the AEBS to the iMac via ethernet.

    Do I have different options wired vs wireless?

    Mark
     
  6. g-boac thread starter macrumors 6502

    Joined:
    Oct 7, 2007
    #6
    Hi James,

    If I understand you right, I would have to have a computer (or server) that's on the same network that is awake; if I was at work, or on the road, I would be on a different network, and thus unable to issue the wake command?

    My Time Capsule is always on, am I able to contact the Time Capsule, and issue the wake command through it to the iMac?

    thanks,
    Mark
     
  7. g-boac thread starter macrumors 6502

    Joined:
    Oct 7, 2007
    #7
    Hi Beerfloat,
    I have an AEBS at home connected to the iMac at home, and a Time Capsule at work. Does it support this? And I'm having a little bit of trouble following what you're suggesting I do, can you elaborate a bit on what I'm trying to achieve wit this PAT mapping and UDP?

    thanks,
    Mark
     
  8. Beerfloat macrumors regular

    Beerfloat

    Joined:
    Feb 21, 2009
    #8
    Can't say for sure that it works on an AEBS. Same for the wireless. Some do, but chances are a lot better with wired networks.

    Normally you would send a WoL packet on a LAN as a broadcast UDP on port 9. So basically you'd be sending the packet to 255.255.255.255:9 and all devices on your subnet will receive it, including your sleeping Mac. You can also specify a more limited broadcast address like, say, 192.168.1.255. You could even send it to a unicast address, but when the computer has been asleep for a while its IP address tends to disappear from ARP caches and that'll stop working. So basically, we wanna send it to a broadcast address.

    Almost all routers will allow you to set up a list of static forwarded ports from the outside interface to the inside interface. But not all will allow you to set a broadcast address as internal target.

    Say your external IP address is 10.1.1.1 and your MAC is on an internal LAN with IP address 192.168.1.20. What you'll need to do is set up a port forward 10.1.1.1:9 to 192.168.1.255:9.

    Then use wakeonlan or a utility like that from the outside like so:
    wakeonlan -i 10.1.1.1 00:de:ad:be:ef:40 (ie MAC address of your card)

    If your router supports it, I would map some higher port number on the outside to 9 on the inside. Don't necessarily want outside port scanners to know what you're doing.

    So say have a mapping 10.1.1.1:23456 to 192.168.1.255:9
    wakeonlan -i 10.1.1.1 -p 23456 00:de:ad:be:ef:40
     
  9. Blue Velvet Moderator emeritus

    Joined:
    Jul 4, 2004
  10. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #10
    It's impossible to wake a computer over wireless. Why? The AirPort card shuts off when the computer sleeps. Unlike the ethernet port, the card requires significant power to remain connected to the network.
     
  11. Beerfloat macrumors regular

    Beerfloat

    Joined:
    Feb 21, 2009
    #11
    I was worried that'd be the case with airports, but it's not impossible per se. Any Intel wireless card models 3945 and up can do this.
     
  12. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #12
    Interesting. I hadn't heard that. How does it deal with power management?
     
  13. Beerfloat macrumors regular

    Beerfloat

    Joined:
    Feb 21, 2009
    #13
    They claim it gets by on a very low voltage connection, w/e that means :)
     
  14. g-boac thread starter macrumors 6502

    Joined:
    Oct 7, 2007
    #14
    These are not built into any Macs as part of their native chipsets, are they?
     
  15. Beerfloat macrumors regular

    Beerfloat

    Joined:
    Feb 21, 2009
    #15
    No I believe recent Airports have had Broadcom and Atheros chips.
     

Share This Page