6

Currently, I can wake my PC by sending a magic packet from another device on the LAN. However, the PC will not power on when I send the packet from outside the network (WAN), even though I have my router instructed to forward UDP traffic on port 9 to the PC. If I run wireshark Install wireshark on the machine and send the magic packet over WAN, it is indeed received by the PC.

This related question seems to indicate that NAT traversal modifies the packet in some way, which prevents it from actually waking the PC. The accepted answer suggests:

Untick "only allow a Magic packet to wake the computer"

However, this instruction is intended for Windows and not Ubuntu.

Is there an equivalent setting or command that will instruct my network card to accept any packet?

Technical Information

  • card: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411
  • router: Netgear Nighthawk X6 R8000
3
  • Does WakeOnLAN not support this feature? Also this Ubuntu forum site may answer this.ubuntuforums.org/showthread.php?t=2160202
    – Virusboy
    Feb 2, 2015 at 20:39
  • My BIOS supports WOL by "Interesting Packets" "Link Status Change" "Magic Packet" "BootP" "PXE Support" and "all"... (Meaning: have a look through your BIOS)
    – Fabby
    Feb 6, 2015 at 22:52
  • Read en.wikipedia.org/wiki/Wake-on-LAN to understand the limitations (and risks) of Wake-On-Lan, and what a "Magic Packet" looks like, and that it is usually sent via UDP datagram to port 7 or 9, or directly over Ethernet as EtherType 0x0842.
    – waltinator
    Feb 9, 2015 at 21:06

2 Answers 2

3

I created a question this week,
when solving I unwantedly enabled more than just magic packets to wake the PC
My solution might help for someone finding this
ethtool -s enp3s0 wol g will only allow magic packets, whereas
ethtool -s enp3s0 wol pumbg will accept ping, arp, broadcast,...

if you want the setting to persisst you also need to make a service:
etc/systemd/system/wol.service looks like this:

[Unit]
Description=Configure Wake-up on LAN

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s enp3s0 wol g

[Install]
WantedBy=basic.target

this service will only be applied when you edit /etc/netplan/youryamlfile
to contain wakeonlan: true:

      ethernets:
          enp3s0:
                  addresses: [192.168.0.99/24]
                  gateway4: 192.168.0.1
                  wakeonlan: true
                  nameservers:
                    addresses: [192.168.0.1]
0

Just want to add more details to the different WOL types (from ethtool man)

       wol p|u|m|b|a|g|s|f|d...
              Sets Wake-on-LAN options.  Not all devices support
              this.  The argument to this option is a string of
              characters specifying which options to enable.
              p   Wake on PHY activity
              u   Wake on unicast messages
              m   Wake on multicast messages
              b   Wake on broadcast messages
              a   Wake on ARP
              g   Wake on MagicPacket™
              s   Enable SecureOn™ password for MagicPacket™
              f   Wake on filter(s)
              d   Disable (wake on nothing).  This option
                  clears all previous options.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .