Wake on LAN - AleixMT/home-server GitHub Wiki
To allow us to reduce energy consumption when we are not using the server but also allowing us to always be able to switch on the server from any part of the world if it is off we will use the WoL protocol. This protocol uses IP-layer packages that contain an IP destiny and a MAC address that coincides with the MAC address of the destiny machine to wake up a remote computer if its motherboard and network card are configured to do so. The default port for receiving WoL packages is port 9.
First we need to turn on WoL in the BIOS of the server. Access your server BIOS configuration pressing the BIOS key on boot time, you may need to look for the default key to access your BIOS:
- ASRock: F2 or DEL
- ASUS: F2 for all PCs, F2 or DEL for Motherboards
- Acer: F2 or DEL
- Dell: F2 or F12
- ECS: DEL
- Gigabyte / Aorus: F2 or DEL
- HP: F10
- Lenovo (Consumer Laptops): F2 or Fn + F2
- Lenovo (Desktops): F1
- Lenovo (ThinkPads): Enter, then F1.
- MSI: DEL for motherboards and PCs
- Microsoft Surface Tablets: Press and hold volume up button.
- Origin PC: F2
- Samsung: F2
- Toshiba: F2
- Zotac: DEL
Search for the WoL configuration, it can be in different places depending on the manufacturer, but usually is on power or energy management. Remember that this capability has to be supported by your motherboard and network card, so you may not have it. Also the network card has to be physically connected to the router using an ethernet cable. If it is connected with Wi-Fi WoL will not work and instead we need to use Wake-on-WLAN (WoW) technology, which is not the goal of this guide and is harder to implement.
Then in the router we need to configure a rule to allow WoL packets to pass through the NAT and reach our server. The problem is that WoL is a special protocol because it uses a destiny IP, but our server is off and as such it does not have one assigned. Realizing that, WoL protocol requires that packages are sent to broadcast, so all the machines in your LAN will receive the WoL package but only the one with the coinciding MAC address and correct BIOS configuration will be switched on. Sending broadcast LAN packages to a network from outside of it is disabled by default in routers, so we need to configure in our router a dedicated WoL rule in order to forward WoL packages received on certain specified port(s) of the router to certain port(s) of all the machines in the LAN.
This requires a special configuration that may be not replicable by using port forwarding, instead, we would have to use a dedicated tab in our router config to allow WoL packages to be forwarded to all the machines of our LAN. This could be considered a port forwarding rule, but because its destination is a special location (broadcast) has to be activated in its own configuration tab.
| Origin machine | WoL attackable in |
|---|---|
| Inside LAN | 192.168.0.155:9 |
| outside LAN (WAN) | http://Sensible#2:Sensible#4 |
To send WoL packets from our Android phone we can download the app WolOn from the Google Play Store and send the packages to the correct destination with the previously specified parameters. You can leave the parameter SecureOn empty.
You can configure one LAN and one WAN configuration, the first using the IP local address with the corresponding ports for when you are at home (you can leave the VPN option off) and the second using the dynamic DNS hostname that we configured in previous steps and the WoL port that we opened before.


Get a machine that does not consume much energy, since this machine will be on and actually this destroys the purpose of wol, but at least we do not need our server always on.
I got a raspberry Pi. You can do it on android but you will need root.
So basically I got another hole in my router to route incoming connnection into port 2022 of my router into the 22 of the raspberry pi. Like this I can route from outside. Configure a safe ssh server. Configure an awake command so you do not need to type anything