WOLPD

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
PROMISCUOUS MODE
SECURITY
PERFORMANCE
EXAMPLES
REPORTING BUGS
COPYRIGHT
SEE ALSO

NAME

wolpd − Wake-On-LAN proxy daemon

SYNOPSIS

wolpd [OPTION]...

DESCRIPTION

Wake-on-LAN (WOL) is an Ethernet computer networking standard that allows a computer to be turned on or woken up by a network message. The message is usually sent by a simple program executed on another computer on the local area network.

WOL packets are not forwarded by routers, which is where wolpd comes into play, by proxying WOL packets from one network to an other.

WOL packets can be send either over UDP transport or in a raw Ethernet frame. wolpd can listen to one or both kinds on an input interface and forward them to an output interface which must be specified respectively with --input-interface and --output-interface options.

By default, wolpd only listens for Ethernet frames with Ethertype 0x0842 which is the standard Ethertype for raw WOL packets. The Ethertype can be changed with the --ethertype option. Listening for raw Ethernet frames can also be disabled with the --no-ether option.

wolpd can also listen for UDP-encapsulated WOL packets if the --udp or --port options are used. Just using --udp will turn on listening to UDP packets on any UDP port. Using the --port option (with or without the --udp option) will turn on UDP listening only on the given UDP port.

OPTIONS

−C, −−chroot=DIRECTORY

chroot(2) to DIRECTORY.

−e, −−ethertype=ETHERTYPE

Listen for WOL packets with given ethernet type. (Default: 0x0842)

−E, −−no−ether

Do not listen for raw ethernet WOL packets.

−f, −−foreground

Don’t fork to background.

−h, −−help

Print this help, then exit.

−i, −−input−interface=IFACE

Source network interface.

−o, −−output−interface=IFACE

Destination network interface.

−p, −−port=PORT

UDP port used for WOL packets. Implies −−udp.

−P, −−promiscuous

Put the input interface in promiscuous mode.

−s, −−setuid=USER

Change the process user if to USER after initialization. (Default: keep running as root)

−u, −−udp

Listens to UDP WOL packets. Unless a PORT is specified with −−port, listens to *all* UDP ports.

−U, −−no−udp

Do not listen for WOL packets on UDP. (default)

−v, −−version

Print version number, then exit.

PROMISCUOUS MODE

The --promiscuous option sets the input interface specified with --input-interface in promiscuous mode. This is only necessary:

- when listening for raw Ethernet WOL frames, if the unicast WOL
packets are used.

- when listening for UDP WOL packets, if the machine running wolpd is not the default router on the network.

If the WOL packets don’t get forwarded by wolpd, you may want to try the --promiscuous option.

SECURITY

For best security, run wolpd with both --chroot and --setuid options.
Create an empty directory (eg. /var/empty/wolpd), owned by root.
Create a dedicated wolpd user and group.
Then run wolpd with:

wolpd --chroot /var/empty/wolpd --setuid wolpd [other-options]

wolpd logs every packet it forwards to syslog(3) (or to standard error instead if running in the --foreground) and the messages look like:

wolpd[pid]: magic raw Ethernet packet from XX:XX:XX:XX:XX:XX to YY:YY:YY:YY:YY:YY WOL ZZ:ZZ:ZZ:ZZ:ZZ:ZZ

wolpd[pid]: magic UDP packet from XX:XX:XX:XX:XX:XX/xx.xx.xx.xx port sport to YY:YY:YY:YY:YY:YY/yy.yy.yy.yy port dport WOL ZZ:ZZ:ZZ:ZZ:ZZ:ZZ

where:

XX:XX:XX:XX:XX:XX is the source Ethernet address of the received WOL frame,

YY:YY:YY:YY:YY:YY is the destination Ethernet address of the received WOL frame,

xx.xx.xx.xx and sport are the source IP address and UDP port of the received WOL frame,

yy.yy.yy.yy and dport are the destination IP address and UDP port of the received WOL frame,

ZZ:ZZ:ZZ:ZZ:ZZ:ZZ is Ethernet address of the host to be awoken (the WOL payload field).

Errors are also logged to syslog(3) (or to standard error instead if running in the --foreground ).

PERFORMANCE

wolpd uses socket filters (BPF) on its input raw socket(s) to inspect the frames and validates the full WOL payload. Only valid WOL frames are returned to user-space, and the invalid ones are discarded in the kernel.

However note that using the --promiscuous option may negatively affect networking performance.

EXAMPLES

Assuming the following network:

            enp1 +---------+ enp2
   -----+--------+ router1 +----+----------+------
        |        +---------+    |          |
        |                       |          |
    +---+---+               +---+---+  +---+---+
    | host1 |               | host2 |  | host3 |
    +-------+               +-------+  +-------+
                                       54:0:0:0:0:1

You do not need wolpd to send WOL packets from host2 to host3 since they are on the same network. But wolpd is needed if you want to sent WOL packets from host1 to host3:

wolpd --input-interface enp1 --output-interface enp2

will forward broadcast raw Ethernet WOL frames with the standard WOL Ethertype of 0x0842 from enp1 to enp2. You can then WOL host3 from host1 by running on host1:

ether-wake -b 54:0:0:0:0:1

Note that -b is required when invoking ether-wake since wolpd is not running in promiscuous mode.

wolpd --input-interface enp1 --output-interface enp2 --promiscuous

will forward any raw Ethernet WOL frames with the standard WOL Ethertype of 0x0842 from enp1 to enp2. You can then WOL host3 from host1 by running on host1:

ether-wake 54:0:0:0:0:1

wolpd --input-interface enp1 --output-interface enp2 --ethertype 0x8088

will forward any Ethernet WOL frames with the custom Ethertype of 0x8088 from enp1 to enp2.

wolpd --input-interface enp1 --output-interface enp2 --no-ether --udp

will forward any WOL UDP packet on any UDP port from enp1 to enp2.

wolpd --input-interface enp1 --output-interface enp2 --no-ether --port 9

will forward any WOL UDP packet on port 9 from enp1 to enp2.

wolpd --input-interface enp1 --output-interface enp2 --port 9

will forward both broadcast raw Ethernet WOL frames with the standard WOL Ethertype of 0x0842 and WOL UDP packets on port 9 from enp1 to enp2.

REPORTING BUGS

Report bugs to <https://github.com/F−i−f/wolpd/issues>.

COPYRIGHT

Copyright © 2010 Federico Simoncelli
Copyright © 2019 Philippe Troin (F−i−f on GitHub)

wolpd comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

SEE ALSO

ether-wake(8)