With Wake on LAN you can power on your computer or server on the local network using a so-called magic packet. This short guide covers the Linux configuration you need to use Wake on LAN under Proxmox, beyond the required BIOS settings. You will find the BIOS settings in your motherboard manual or via Google. Once you have taken care of that part, continue with the following configuration.
# install ethtool
apt install ethtool
# list all network devices of the machine
ip addr
In the list that is displayed, look for the device that currently holds the IP address of your Proxmox server. Besides physical network cards, the list also contains virtual ones assigned to the running VMs. In my case the network device is called “enp2s0”; you need to replace that name with the name of your device in the following commands.
# show details of the network device
ethtool enp2s0
This command now shows you details about the network device. We are interested in the “Wake-on:” entry, which should show “d” in your case. We want to set the flag to “g” to enable Wake on LAN.
# set the wake on lan flag to g
ethtool -s enp2s0 wol g
This setting only stays active until the computer restarts. To make it permanent, we need to edit the file /etc/network/interfaces.
# edit the network config
nano /etc/network/interfaces
Now look for the entry for your network adapter and add the following line directly below it (again, the adapter name needs to be adjusted).
post-up /usr/sbin/ethtool -s enp2s0 wol g
Save the file and shut down the PC / server. Then you can send your magic packet, and the device should start up on its own. After the restart, you should also check that the flag we changed in the config is set correctly. Use the command ethtool enp2s0 again; the output under Wake-on: should show “g” once more.




