Skip to content

F-i-f/wolpd

 
 

Repository files navigation

Wolpd

A Wake-On-LAN Proxy Daemon for Linux

Master: Build Status

Coverity: Build Status Coverity Scan Build Status

Features

  • Proxies WOL packets from one interface to an other.

  • Proxies either or both raw Ethernet WOL frames as well as UDP WOL packets.

  • The raw Ethernet Ethertype to listen for can be configured.

  • Can listen on all UDP ports or a single UDP port for WOL packets.

  • Secure: can be configured to run as a dedicated unprivileged user in chroot (root is still required at initialization to open the raw socket(s)).

  • Efficient: uses socket filters so that all the filtering is done by the kernel. User-space sees only valid WOL frames or packets.

  • No third-party dependencies: Uses only libc.

Configuration & Set-Up

wolpd does not have any configurations files. It can be run directly from the command line.

When using the default installation, if an init system (whether systemd or traditional SysV init systems) is detected, wolpd will install the appropriate systemd service file or the SysV init script.

The options used by wolpd when started by either systemd or SysV init can then be configured by changing the WOLPD_OPTIONS line in /etc/sysconfig/wolpd or /usr/local/etc/sysconfig/wolpd (the actual location may vary depending on your build prefix).

Before wolpd can run successfully by your init system, the .../etc/sysconfig/wolpd file must be edited to fill in the input and output interfaces.

If you use systemd, wolpd can be started or stopped with:

  • For one-time operation (won't restart after a reboot):
systemctl start wolpd.service
systemctl stop wolpd.service
  • For persistent operation (start now and automatically at boot):
systemctl enable --now wolpd.service
systemctl disable --now wolpd.service

If you use a traditional SysV init, please refer to your distribution's documentation.

wolpd comes with an extensive manual page.

View or download the manual page as: [HTML], [PDF] or [ROFF].

Future directions

  • While currently wolpd requires a pair of input and output interface as arguments, we should be able to forwards a WOL frame arriving on any interface to all the other interfaces.

  • wolpd could also rewrite UDP WOL packets to raw Ethernet WOL frames and/or the converse.

License

wolpd is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/].

Building from source

Requirements

  • C Compiler (eg. gcc)

  • Make (eg. GNU make)

  • autotools (autoconf, automake) is only required if building from the repository.

  • help2man (optional, used to generate the manual page)

  • groff is optionally needed to generate the man page hard copies (HTML & PDF). It is only needed if you intend to update the manual page ROFF or wolpd C sources.

  • The provided init scripts and systemd service files assume that a user with no privileges named wolpd is present on the system. You can create it with:

    useradd -r -d /var/empty/wolpd -c 'Wake-on-LAN Proxy Daemon' wolpd

    However this is not required, and you can modify the init script and/or systemd service file to run wolpd as another user.

From a release

Download the latest release from GitHub or the secondary mirror:

The source code release are signed with the GPG key ID 0x88D51582, available on your nearest GPG server or here.

You can also find all releases on the GitHub release page. Be careful to download the source code from the link named with the full file name (wolpd-1.0.7.tar.gz), and not from the links marked Source code (zip) or Source code (tar.gz) as these are repository snapshots generated automatically by GitHub and require specialized tools to build (see Building from GitHub).

After downloading the sources, unpack and build with:

tar xvzf wolpd-1.0.7.tar.gz
cd wolpd-1.0.7
./configure
make
make install
make install-pdf install-html # Optional

Alternately, you can create a RPM file by moving the source tar file and the included wolpd.spec in your rpm build directory and running:

rpmbuild -ba SPECS/wolpd.spec

From the GitHub repository

Clone the repository:

git clone https://github.com/F-i-f/wolpd.git
cd wolpd
autoreconf -i
./configure
make
make install
make install-pdf install-html # Optional

Changelog

Version 1.0.7

June 14, 2020

  • Handle WOL packets not sent to the broadcast address.

Version 1.0.6

November 13, 2019

  • Fix regression introduced in 1.0.5, where UDP packets would be dropped if --port was specified.

Version 1.0.5

November 2, 2019

  • Use more compatible struct udphdr member names.
  • Spec file compatibility with RHEL6/7/8, SuSE, EPEL and Mageia (for Copr builds).
  • Install systemd unit file even if systemd is down (like in mock).

Version 1.0.4

May 22, 2019

  • Fix Coverity-detected errors.
  • Only check that stdout is connected to systemd once.

Version 1.0.3

May 3, 2019

  • Build script-ware and documentation improvements.

Version 1.0.2

April 17, 2019

  • Improve logging.

Version 1.0.1

April 16, 2019

  • Minor bug fix release: Exit cleanly upon receiving a termination signal.

Version 1.0

April 16, 2019

  • First release under new management.

This is a fork

This project is a fork of wolpd from Federico Simoncelli [email protected].

It has been almost entirely rewritten at this point, and all the blame should go to the current maintainer (F-i-f).

Please note that since the original repository was created by a very old version of git, it does not run git fsck successfully. This repository contains the same history as the original, but it has been exported and re-imported so that git fsck does not complain. The last imported commit from the original repository is 6b1c5b63633a2ea66e2ca12d82412af83164f746, and corresponds to 07d947c1b7f3fd0db0d5ed4d1d3de8d8665668e4 in this repository.

Credits

wolpd was originally written by Federico Simoncelli [email protected].

It has now almost been completely rewritten by Philippe Troin (F-i-f on GitHub).

Packages

No packages published

Languages

  • C 63.3%
  • M4 16.5%
  • Roff 11.4%
  • Makefile 6.3%
  • Shell 2.5%