List the interfaces on your system for proper identification. The ip command will inform the names and states of them.
ip a
Execute ethtool with the name of the interface that must be configured to wake on lan.
sudo ethtool [interface]
To enable WOL on an interface (non-persistent) type:
sudo ethtool -s [interface] wol g
To make a persistent change in the interface edit the /etc/network/interfaces.d/eth0 (or modify the global interface config file /etc/network/interfaces):
auto eth0
iface eth0 inet dhcp
ethernet-wol g
OR
auto eth0
iface eth0 inet dhcp
post-up ethtool -s [interface] wol g
Another way is to edit the main configuration file and add the following instruction at the end of the file:
post-up /usr/sbin/ethtool -s [interface] wol g
The post-up command will trigger the execution of the ethtool command on the selected interface after the interface has been initialized.
etherwake, wakeonlan, gwakeonlan
Wake-on: g means it is enabled.