Last active
October 20, 2025 18:11
-
-
Save paddy74/9cd4160a1ff4eedb0366d0e6e5c02c50 to your computer and use it in GitHub Desktop.
Revisions
-
paddy74 revised this gist
Nov 27, 2019 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,3 +29,7 @@ wol target_internal_IP target_MAC_address # Across the internet # Enable port forwarding on target's static IP wol -p forwarded_port -i router_IP target_MAC_address # Listen for incoming WOL requests on target computer sudo pacman -Syu netcat nc --udp --listen --local-port=9 --hexdump -
paddy74 revised this gist
Nov 27, 2019 . 1 changed file with 26 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/bin/bash # https://wiki.archlinux.org/index.php/Wake-on-LAN #!/bin/bash # definition of MAC addresses monster=01:12:46:82:ab:4f ghost=01:1a:d2:56:6b:e6 echo "Which PC to wake?" echo "m) monster" echo "g) ghost" echo "q) quit" read input1 case $input1 in m) /usr/bin/wol $monster ;; g) # uses wol over the internet provided that port 9 is forwarded to ghost on ghost's router /usr/bin/wol --port=9 --host=ghost.mydomain.org $ghost ;; Q|q) break ;; esac -
paddy74 revised this gist
Nov 27, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ sudo systemd enable [email protected] # TODO: Require password # Trigger a wake-up, port should be 9 (?) # Install wol # TODO: https://www.depicus.com/wake-on-lan/woli -
paddy74 created this gist
Nov 27, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ #!/bin/bash # https://wiki.archlinux.org/index.php/Wake-on-LAN sudo pacman -Syu ethtool # d (disabled), p (PHY activity), u (unicast activity), m (multicast activity), # b (broadcast activity), a (ARP activity), and g (magic packet activity) ethtool <interface> | grep Wake-on # If not g ethtool -s <interface> wol g # Enable persistence using systemd sudo systemd enable [email protected] # TODO: Require password # Trigger a wake-up # Install wol # TODO: https://www.depicus.com/wake-on-lan/woli # Find the MAC address ip link # In-network wol target_MAC_address # or wol target_internal_IP target_MAC_address # Across the internet # Enable port forwarding on target's static IP wol -p forwarded_port -i router_IP target_MAC_address This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ [Unit] Description=Wake-on-LAN for %i Requires=network.target After=network.target [Service] ExecStart=/usr/bin/ethtool -s %i wol g Type=oneshot [Install] WantedBy=multi-user.target