Skip navigation
This discussion is archived

Configuring port mapping for wake-on-LAN

20317 Views 15 Replies Latest reply: Dec 26, 2008 1:39 AM by tompijls RSS
1 2 Previous Next
Chap Harrison Level 1 Level 1 (115 points)
Currently Being Moderated
Aug 25, 2008 1:53 PM
I had this working once upon a time, several OS's ago and with Airport Extreme base station. Now I have a Time Capsule and 10.5.4.

My Wake On LAN script (which is being run at a remote site) sends a magic packet to UDP port 9 of my public IP address. My LAN uses addresses from the 192.168.1.* range. I added a port-mapping entry to Time Capsule as follows:

Public UDP port: 9
Private IP address: 192.168.1.255 (i.e. the broadcast address)
Private UDP port: 9

(The targeted machine is attached to Time Capsule via ethernet.)

The packet never seems to get onto the LAN. I've confirmed this by running tcpdump on the LAN: I do not see any packets from the remote IP address.

Of course, I don't know for a fact that the packet is successfully arriving at my cable modem. That will be harder to verify, but I wondered if anyone knew of something obvious I'm doing wrong at my end. Do UDP port 9 ("discard") packets maybe get discarded somewhere along the way?

Thanks,
Chap
2.4GHz MacBook Pro, Mac OS X (10.5), Time Capsule 500GB
  • everkleer Level 1 Level 1 (5 points)
    Currently Being Moderated
    Sep 23, 2008 9:14 AM (in response to Chap Harrison)
    Ever get an answer to this? I don't yet have an Airport Extreme or Timecapsule (am thinking of getting one of the two) but I have tried for hours and hours to get this working with other routers and came to agree with the posts I read that say most home-use routers will not let you forward to the broadcast IP address. I know there are a few routers (Ex. Linksys WRT54G - don't have it but read this) can do this, and, even though the Javascript in the web interface was trying not to let me, I was able to get this working on my Linksys BEFSR41 using a little hack to bypass the Javascript message. But anyway I've only found information that says that the Airport Extreme is one of the routers that can not do this, so if you can get it working I am interested to know. (I thought the Time Capsule was basically an Airport Extreme with an internal hard drive, but maybe not?)
    iMac (Leopard), MacBook (Leopard), iBook G4 (Tiger), Mac OS X (10.5.5)
  • paddad21 Level 1 Level 1 (0 points)
    Currently Being Moderated
    Oct 11, 2008 10:52 AM (in response to everkleer)
    The time capsule does not allow port forwarding to the broadcast ip address. The time capsule will drop the packet.
    Mac OS X (10.5.5)
  • kludgeless Level 1 Level 1 (0 points)
    Currently Being Moderated
    Oct 22, 2008 7:33 PM (in response to Chap Harrison)
    I tried mapping the port to the address of my ethernet adapter:

    Public UDP port: 9
    Private IP address: 192.168.1.2
    Private UDP port: 9

    That didn't work either. Is there any way to wake a Mac remotely through Time Capsule? I've searched extensively and found nothing. Really disappointing since two out of three things I've wanted to do remotely through the Time Capsule haven't worked (Wake on lan, sharing of disk with remote Windows machines, and VNC access; only VNC seems to work). Thanks in advance for any assistance!
    Thinkpad T60p, Windows Vista
  • googleplex3000 Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 6, 2008 8:42 AM (in response to Chap Harrison)
    The key to success here is to setup the subnet mask on your router to 255.255.255.128.
    Then forward UDP port 9 to 192.168.0.127 (or whatever for the first three octets) - which is the broadcast address for that subnet.
    Many (if not all) routers will not allow port forwarding to the broadcast address .255 on a /24 network
    Macbook, Mac OS X (10.5.5)
  • Camelot Level 8 Level 8 (45,670 points)
    Currently Being Moderated
    Dec 6, 2008 11:19 AM (in response to kludgeless)
    I tried mapping the port to the address of my ethernet adapter:


    That would never work anyway - when the machine is asleep it does not have an IP address. Wake-on-LAN specifically targets the broadcast address just for that reason.
    Mac OS X (10.5.4)
  • Andreas Schuderer Calculating status...
    Currently Being Moderated
    Dec 9, 2008 3:24 AM (in response to Camelot)
    Just to stifle further experimentation:
    - No, binding the IP address to a MAC in the Airport BS doesn't solve this
    - No, increasing the DHCP lease timeout doesn't solve this, either
    MacBook Pro, Mac OS X (10.5.4)
  • Tim Haigh Level 7 Level 7 (24,190 points)
    Currently Being Moderated
    Dec 13, 2008 10:09 AM (in response to Chap Harrison)
    Apple's base stations and time capsules are great routers but lack features that other routers boast. They do however make fantastic access points and are easy to setup.

    You could get a router such as a linksys wrt54g and install openwrt or dd-wrt firmware on it. This firmware allows you to install a wake on lan client inside the router. You could then ssh into the router from anywhere and send the magic packet from the router to the MAC address of any computer on that LAN.
    Mac Mini Core Duo 1.8ghz Leopard Server; MacBookPro 2.2ghz, Mac OS X (10.5.5), Be Pro 24megabit ADSL2+
  • tompijls Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 22, 2008 11:31 AM (in response to Chap Harrison)
    hi chap, what version are you using? My airport extreme (firmware 7.3.2 with airport utility 5.3.2) allows to add 255 as last octet, but it has no effect.

    Best,

    Tom
    Mac OS X (10.5.6)
  • tompijls Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 22, 2008 11:32 AM (in response to googleplex3000)
    hi googleplex, could you explain how you managed to change subnet?

    Best,

    Tom
    Mac OS X (10.5.6)
  • tompijls Level 1 Level 1 (0 points)
    Currently Being Moderated
    Dec 23, 2008 11:00 AM (in response to googleplex3000)
    This does actually work for me.

    First i made sure that all NAT port mappings and DHCP reservations were below x.x.x.127

    Then i saved from airport utility the configuration to a file.

    With a text editor , I replaced all occurrences of 255.255.255.0 in this file to 255.255.255.128.

    Load the configuration file back in the airport utility and update the airport extreme.

    Create a Nat port mapping to port 9 on the pc to wake up

    Now send the magic packet to the external ip/port boots the pc

    not sure if this is a supported way of working so do it at your own risk
    Mac OS X (10.5.6)
1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.