How to configure wireless wake-on-lan for Linux WiFi card

h‮w//:sptt‬ww.lautturi.com
How to configure wireless wake-on-lan for Linux WiFi card

To configure wireless wake-on-LAN (WoL) for a Linux WiFi card, you will need to ensure that the card supports WoL and that the necessary kernel modules are loaded. You will also need to configure the system to allow WoL packets to be forwarded to the WiFi card.

  1. Check whether the WiFi card supports WoL by running the ethtool command:
ethtool -s wlan0 wol g

Replace wlan0 with the name of your WiFi interface. If the command returns Supports Wake-on: g, the WiFi card supports WoL.

  1. Load the necessary kernel modules by adding the following lines to the /etc/modules file:
iwlwifi
iwldvm
  1. Enable WoL in the network interface configuration by adding the following line to the /etc/network/interfaces file:
allow-hotplug wlan0
iface wlan0 inet dhcp
    wol g

Replace wlan0 with the name of your WiFi interface.

  1. Enable IPv4 packet forwarding by adding the following line to the /etc/sysctl.conf file:
net.ipv4.ip_forward=1
  1. Enable IPv4 packet forwarding in the current session by running the following command:
sysctl -w net.ipv4.ip_forward=1
  1. Enable NAT for the WiFi

To enable NAT for the WiFi, you will need to log into your router's settings and enable the NAT feature. Depending on the router, this may be found in the Wireless Settings, Advanced Settings, or Network Settings. Once you have enabled NAT, you will need to save the settings and restart the router for the changes to take effect.

Created Time:2017-10-16 14:38:45  Author:lautturi