from meekah@lemmy.world to linux@lemmy.ml on 05 Sep 07:09
https://lemmy.world/post/35473006
I am trying to set up a simple home server with some old hardware, and since power is pretty expensive here I am trying to enable WoL so that I can turn it on whenever I need it, and automatically shut it down after a short time of inactivity.
I enabled WoL (“Power On By PME”) in my BIOS, which then allowed me to enable WoL in my network device drivers using nmcli
. It now reliably shows mode g
selected after reboot, as reported by ethtool
. I installed gWakeOnLan on another device to try waking my server, but to no avail.
When my server is shut down, the ethernet LEDs are still blinking, so I suppose the network device successfully stays turned on after shutdown. However, when I use netcat
on my server to check that the magic packets get there, I can’t see any output after sending the packets using gWakeOnLan. I tried both ports 9 and 40000.
I am using a router that was provided to me by my network provider, maybe I need to enable/unblock something there? No idea what it would be, though.
Any ideas on how to track this issue further down?
Edit: I am now using wol
instead of gWakeOnLan. this command worked for me:
wol -p 9 -i 192.168.2.255 <server-mac-address>
.
I got the IP from ip address
:
inet 192.168.2.31/24 brd 192.168.2.255 scope global dynamic noprefixroute eno1
I’d like having a little GUI but apparently it’s not possible to configure the IP in gWakeOnLan like this. I tried setting it to ‘internet’ mode (to allow me to enter my IP) but that didn’t work. Oh well, a little script to double-click is fine, too, haha
threaded - newest
It might work better if computer sleeps. Try that first. If that works, then it probably means you have to setup bios properly if that’s even configurable with your hardware. Or you can just go with sleep instead of power down.
How would this explain the packet not reaching the server in a powered on state?
Yeah, that won’t but you could still try, just in case. Other than that, are both client and server on same IP segment? About router - I’d really suggest using your own router (also firewall) behind the provided one. Otherwise you are exposing your internal network to network provider which you might not want to do and at the same time you don’t have a control over the core device in your network.
Thanks for the tip regarding the IP segment, that seemed to be it. I needed to use the correct broadcast IP for the subnet (I think? I’m bad with networks. I used 192.168.2.255 instead of 255.255.255.255, and now it works)
And yeah, I am looking to get a router at some point. Hard to make such a purchase when I’m struggling to make ends meet currently, though.
Hard to say if you don’t have any control over your router. It’s possible it’s blocking it, but to troubleshoot: