Enable and test Wake-on-LAN (WOL)

Enable Wake-on-LAN in BIOS/UEFI

  • Reboot the server and enter BIOS/UEFI (usually Delete, F2, F10, or F12 during boot).

  • Locate the "Wake-on-LAN," “Power On by PCI-E,” or similar option in the power management section.

  • Set this option to “Enabled.”

  • Save changes and exit BIOS.

Obtain the MAC Address of Your Proxmox Server

  1. Access the Proxmox shell via the web interface or SSH.

  2. Run:

    ip addr
  3. Find the active Ethernet interface associated with your LAN and note its MAC address (displayed after link/ether). For example:

2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP>
    link/ether 18:7d:23:fa:87:02 brd ff:ff:ff:ff:ff:ff

The MAC address above is 18:7d:23:fa:87:02 — write down your actual MAC for later use.

Configure WOL Support in Proxmox/Linux

  1. Install ethtool:

    textapt update
    apt install ethtool
  2. Check Network Interface WOL Support:

    ethtool eno1

    Replace eno1 with your actual interface. Look for Supports Wake-on: g and Wake-on: d or Wake-on: g.

    • If it lists Wake-on: d, WOL is currently disabled.

    • If it lists Wake-on: g, WOL is enabled.

  3. Enable Wake-on-LAN:

    ethtool -s eno1 wol g

    This turns on WOL until the next reboot.

  4. Make WOL Setting Persistent: Edit /etc/network/interfaces:

    nano /etc/network/interfaces

    Under the correct iface line for your interface, add:

    post-up /usr/sbin/ethtool -s eno1 wol g

    A sample configuration:

    auto eno1
    iface eno1 inet static
      address 192.168.1.10
      netmask 255.255.255.0
      gateway 192.168.1.1
      post-up /usr/sbin/ethtool -s eno1 wol g

    Save and exit the file. This command ensures that WOL is always enabled after a reboot.

  5. Reload Network Settings in Proxmox GUI (Optional):

    • Navigate to Node > System > Network.

    • Select your interface and click “Edit.”

    • Add the Autostart flag, then save.

Shutdown and Prepare for Testing

  1. Fully power off (shutdown) the Proxmox server.

  2. Confirm that the network interface LEDs remain active or blinking—this typically indicates WOL hardware is ready.

Sending a magic packet from linux

Option 1: Python (wol.py)

import socket

mac = '1A:2B:3C:4D:5E:6F' # Modify Mac address
mac_bytes = bytes.fromhex(mac.replace(':',''))
packet = b'\xFF'*6 + mac_bytes*16

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
sock.sendto(packet, ('<broadcast>', 9))  # Port 9 is common for WOL
sock.close()

Option 2: Install Wake on Lan tools

RedHat Distros

sudo dnf install wol -y
sudo dnf install etherwake -y

Debian

sudo apt install wakeonlan -y

Sending a Magic Packet from Windows

Option 1: Using a Free Utility (WakeMeOnLan by NirSoft)

  1. Download and extract WakeMeOnLan from NirSoft’s website.

  2. Run the application and click “Add New Computer.”

  3. Enter your Proxmox server’s MAC address and (optionally) its IP or broadcast address. Save the entry.

  4. Select the entry and click “Wake Up Selected Computers” to send the magic packet.nirsoft

Option 2: Using Windows PowerShell

  1. Open Notepad and paste the following (replace MAC and broadcast address with your own):

    $mac="1A:2B:3C:4D:5E:6F"
    $broadcast="192.168.1.255"
    $port=9
    $addr=([System.Net.IPAddress])$broadcast
    $udp=[System.Net.Sockets.UdpClient]::new()
    $packet = ([byte[]](,0xFF * 6 + (($mac -split "[:-]") | % { [byte]("0x$_") }) * 16))
    $udp.Send($packet, $packet.Length, $broadcast, $port)
    $udp.Close()
  2. Save as wol.ps1.

  3. Right-click and run with PowerShell (script execution policy may need adjustment).pdq

Confirming WOL Functionality

  • After sending the packet, the Proxmox server should power on if all settings are correct.

  • Upon startup, recheck WOL status with:

    ethtool eno1

    Verify that Wake-on: g remains set.

Troubleshooting Notes

  • Ensure wired Ethernet is used (many WiFi chipsets do not support WOL).

  • If WOL does not persist after reboot, double-check /etc/network/interfaces for your post-up line.

  • Some motherboards may require WiFi to be disabled for WOL to work, so test with and without WiFi enabled if you encounter issues.

Last updated