How to: Wake On Lan

12 Sep 2012 at 00:00:00 - 0 comment(s)

First in the BIOS of the computer you want to wake up, enable something like 'PCI Power up'

The computer you want to wake up needs to be connected to your network through ethernet and not through wifi.

If you are on linux, you'll have to enable wake on lan on your network card, create a script with the following content and make it run at startup:

ethtool -s eth0 wol g

Then you need to configure your router to forward an external port to the UDP port 9 (or 7) of the machine you want to wake up. So typically find the page where you configure the NAT on your router and have something like:

external port 5850
internal port 9
internal host

I put but actually the goal is to send a broadcast signal to your LAN network. Unfortunately most routers don't allow this and therefore I have mapped to the broadcast IP. To do so, connect to your router with telnet (or maybe ssh or something else). On Huawei router, you would access your router with telnet and once logged in, you type sh to get a shell and then you run the following command:

arp -s FF:FF:FF:FF:FF:FF

Finally you need a software to send the magic packet, on linux you can use wol. You run the following command to wake up your computer from the internet:

wol -p 5850 -i internet_ip mac_address_computer_to_wake_up

That's it, we have seen how to setup your computer and network to make use of Wake on LAN (WOL) feature.


Notify me of follow up comments