Turning on a PC from distance (Wake On Lan)


How to turn on a PC from distance to allow it, for example, to run in your absence automated tasks?

This of course implies that your home computer is first turned on. If it is off, however, it is a way to turn it on remotely using Wake on Lan.

Wake on Lan is to wake up your computer remotely by sending a "magic packet" on its network card.

Prerequisite

PC to wake

The PC network card to wake must support Wake on Lan.
This can be verified in 2 ways:

1) In the BIOS settings, it is often said "Wake on LAN" or "WOL" enabled / disabled. If disabled, change the Wake on Lan function Enabled.

Note: you enter the BIOS settings by pressing a key (usually "DEL" key or function) immediately after powering on the PC.


2) On Linux, open a terminal and type:

ifconfig

Locate your Ethernet card (usually "eth0")

Note the MAC address of your network card (following figure and letters next to HWaddr)
Note the IP address (listed on figures inet addr :)

Type:

ethtool eth0

Search the lines "Supports Wake On" and "Wake-on"
For Wake on Lan works, you should get at least:

Supports Wake-on: g
Wake-on: g

If you get "Wake-on: d", type:

ethtool -s eth0 wol g

Check that it worked:

ethtool eth0

Since Linux disables network interfaces during system shutdown, edit /etc/rc.local and add "ethtool -s eth0 wol g" before the line "exit 0" as follows:

ethtool -s eth0 wol g
exit 0


Installing Wake on Lan

On the PC that will awaken, open a Terminal and type:

apt-get install wakeonlan


Wake Up the PC from the local network

On the PC that will awaken, open a Terminal and type:

wakeonlan xx: xx: xx: xx: xx: xx

Replace xx with the MAC address you noted above.

PC to wake should light.

Wake up your PC from Internet

planet Network
If you have a firewall, unblock the port 9.

There are many websites that offer online Wake on Lan.
Go to the site eg wakeonlan.me

In "IP or host name", enter the IP address (*) you noted earlier.
In "MAC", enter the MAC address you noted above.
Click on "Wake Up my PC!"

(*): If the IP address you noted is of type 192.168.xx, to wake the PC is in a local network. The alarm clock Internet will not work. It will first configure the router that is connected to the PC to wake up.


Wake up a PC in a local network via the Internet

If you have a firewall, unblock the port 9.

If you have a modem / router in your home, it will load to "translate" the IP address provided by your Internet host in local IP address (192.168.xx) for the different PC connected to the router.

To check this, open a Terminal and type:

ifconfig

Sample output:

eth0 Link encap: Ethernet HWaddr 00: 0d: 60: cc: 78: b5
inet addr: 192.168.1.2 Bcast: 192.168.1.255 Mask: 255.255.255.0


192.168.1.2 is the IP address "local" PC.
It is impossible to directly wake this computer from the Internet.

For Wake on Lan Internet work, you must open the port Wake on Lan (port 9 by default) on the router and redirect this port to the broadcast address, that is to say 192.168.1.255 in this case.

PCs configured for Wake on Lan will come on.

Notes:

- When the clock application, the PC LAN have not local IP address since extinct. That is why you need to forward port 9 on the broadcast address.

- All modem / routers or routers do not have the redirect feature to a broadcast address.

Remember that the best support for this blog is to love and share our articles!

For more news, thank you for subscribe to the blog newsletter to its RSS feed. Please also have a look at TwitterGoogle+ or Facebook for other news.
Previous
Next Post »