Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can i use Wake on Lan on a web server that is a sleep but when the public wants to view my web site it wakes the server up?

As this is what i thought it was and was getting very excited but all i can find on the net is waking up a sleeping computer with your internet device. ie phone

share|improve this question
Well thanks everyone for the response. a disappointing answer but the truth hurts some times, will just have to concentrate on a low powered NAS system instead then. i just assumed that when people typed in my web address as i have the address pointing to my router that the router would send the WOL packet to my NAS server :( o'well :) – Snoopy Dec 14 '11 at 12:17
up vote 3 down vote accepted

Unfortunately, I don't think there's an easy way to do what you want. Wake-on-LAN (or WOMP) requires a specially formatted packet; by design, it's hard to wake a computer "by accident."

Even if you could convince a web browser to include the magic string (which includes your server's MAC address) in the request, it wouldn't work, because the server would need to be woken up by the first packet in the connection (TCP SYN), which doesn't contain data. (And even if you did manage to coax a web browser into including the magic string early enough in the request that it would fit in the first packet, and convinced its OS to include that data in the SYN, it still wouldn't work for at least the first request, because the server's OS would never see that first packet.)

Probably the easiest hard way would be to set up some device between your server and the internet (like a small wireless router) with a HTTP proxy to your real server, and somehow set things up such that whenever a request comes in to the proxy and the real machine isn't awake, it sends the magic packet.

share|improve this answer
I can certainly see making something that could wake a system based on a request, but it would almost certainly be far to slow. – Zoredache Dec 14 '11 at 1:05
@Zoredache: using STR and not full power off could be fast enough, If the server gets one or two hits a week. But then, virtualizing it would be a better idea. It's useful in only very specific workloads. – Hubert Kario Jan 16 '12 at 10:18

No, that's not how it works. You could design such a thing, but you'd need a web server that was always one to send the wake-on-LAN packets to your machine.

share|improve this answer

Welcome to serverfault!

Wake-on-Lan functions by sending a "magic-packet" to the destination mac. This is almost always done on the same subnet as the device/server you're trying to wake up. You can use subnet directed broadcasts on an internal network to overcome this but this option won't be supported over the internet.

The reason you're having trouble is that to do this over the internet, you need to be able to forward a port to a broadcast IP in your perimeter firewall. Typically, port forwarding is configured for a specific destination IP. In this case, you can't do that because the box won't be up so the typical method of figuring out where to send the packet given an IP (ARP) isn't going to work.

Don't fear, you should be able to accomplish this by googl'ing port forwarding for Wake-on-lan with your specific firewall's model, etc. Once you have forwarded a port to the entire subnet (yes I suppose that could be a security risk), then, pop in your public IP, mac of the server, port and fire away.

Of course, the general public wouldn't be able to do this unless you had a basic site on another server that was available that could send the packet for you.

share|improve this answer

In theory, anybody can send a WOL packet. Most users don't know how. How do you suppose they'll get instructions to do it if your server is off? Particularly knowing your MAC address?

If they know that, they can direct the packet to the right subnet and unless a firewall steps in, it would work.

share|improve this answer
It also needs to be a broadcast on the Ethernet level, so it still won't work (unless the host which first routes the packet onto his server's segment supports directed broadcast and the client knows how to do that.) – jon Dec 14 '11 at 2:29

Your Answer


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.