Wake on LAN-you can boot your computer when you are outside
Because I have two PCs at home, one Windows 10 and one Linux CentOS 7, I don’t know if the machine is too old or there is a power problem. Sometimes it hangs up suddenly. When I went home, I saw him resting and shut down there. While waiting to press the boot button, I searched for information on the Internet and found WOL (Wake On Lan) about the method of booting on the Internet, so I wanted to give it a try, and then I set it up. In fact, it is not difficult. One problem, his environment is executed under the LAN, but if you are outside, you have to use some other methods. If you have a router at home that supports the DMZ function, you can set the external IP to the internal IP. But there is another problem. If you don’t have a fixed IP, it won’t work. Later, I used a useless mobile phone to do remote WOL (Wake On Lan). The information is as follows.
- Settings on the WOL host (Windows 10 / CentOS 7)
- Teamviewer HOST
- Wake On Lan (Android / Free)
Step 1: Settings on the WOL host (Windows 10 / CentOS 7)
You must first find the BIOS of the host (Windows or Linux) to set the WOL wake-up function switch (Prower Management Setup).
WOL in BIOS, the most important thing is the following text description, please set it to Enabled when you find it
- Wake On Lan
- Resume On Lan
- Power On PME
- Power On by PCI-E Device
- Power On by Onboard LAN
- PME Event Wark Up
NIC settings for Windows 10
Next, please enable WOL related options in the network card driver. “Control Panel> Network and Internet> Network Connection”
1. Right-click your network card and select “Content”
2. Then select “Settings” in “Connection Method”
3. Next, in “Power Management”, please tick “Allow this device to wake up the computer” and “Only allow Magic packets to wake up the computer”.
PS. If Windows 10 cannot wake up, please try this link, there may be a problem with the power settings https://jingyan.baidu.com/article/ca00d56c7a40e6e99febcf4f.html
CentOS 7 network card settings
For CentOS, please click below command
1. Please install ethtool first
[root@localhost]# yum install ethtool
2. Check if your network card has developed the Wake On function
[root@localhost]# ethtool your network card name ( ifcfg-eth0 ) | grep Wake-on Supports Wake-on: pg Wake-on: g
3. If it is not open, please use the following command to open
[root@localhost]# ethtool -s your network card name ( ifcfg-eth0 ) wol g
4. After opening, please go to your network card name (ifcfg-eth0) to add the setting to activate by net
[root@localhost]# vim /etc/sysconfig/network-scripts/ifcfg-eth0 #Add the following syntax in the last line ETHTOOL_OPTS= "wol g"
Step 2: Install Team Viewer HOST on unused mobile phones
In order to solve the setting of no fixed IP or DMZ, I later chose to use a mobile phone as a springboard for remote boot. Now Team Viewer has launched the function of operating Mobile from a PC. You can download Team Viewer Host from Google Play To operate the boot function.
After opening it, he will need a group of accounts of your Team Viewer, please apply and you can use it
Step 3: Wake On Lan (Android / Free)
This version of Wake On Lan for Android is free, and the setting is very simple. You only need to search your intranet IP, and you can complete the setting after selecting it.
1. Click the “plus sign” below to find the devices in your area network
2. Pull down to enter the search mode, click on the device you want when you find it
3. You can use a name or IP for your device.
Above, the setting is complete.
If there is a problem with the machine when I go out now, I will use Teamviewer to connect to my mobile phone. When I turn on WOL, I can see if the machine is turned off. Just click on it and it will automatically turn on. On the other hand, I can also turn the table on. Turn off the phone, you can save some electricity bills, if necessary, just use the remote to turn on.