Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would have thought waking by IP would be unreliable, certainly in a DHCP environment where the IP could be re-assigned to a different MAC in the event the host is asleep when the lease expires.
You could use a combination of ping and arp to retrieve the MAC for a given IP. That's probably what the Windows utility is doing.
I assume you want to turn on your home computer from outside your local network. From my limited knowledge on the subject WOL is a layer 2 broadcast message which are generally not routed. However, with subnet directed broadcasts you can usually overcome the limitation. It depends on your home router and if it allows forwarding broadcast packets.
I have seen a few programs that could wake over wan and you have to set router usually to nat to specific computer.
Since WOL only works over the LAN, I would just SSH to the router and fire up the program that triggers a magic packet. Because keys would be used for connecting to the router anyway, I'd make a special key just for the WOL call to the one host and have it run a forced command to do just that one thing. The "AUTHORIZED_KEYS FILE FORMAT" section in the manual page for sshd has the details, see command="..." there.
For your example I tried.
But when my computer is in the sleeping mode I can't even ping it's IP Address.
Is the example here `arp -a [IP Address]` the IP Address is mean router's Address or the machine I want to wake up?
For your example I tried.
But when my computer is in the sleeping mode I can't even ping it's IP Address.
Is the example here `arp -a [IP Address]` the IP Address is mean router's Address or the machine I want to wake up?
For your example I tried.
But when my computer is in the sleeping mode I can't even ping it's IP Address.
Is the example here `arp -a [IP Address]` the IP Address is mean router's Address or the machine I want to wake up?
I would have thought waking by IP would be unreliable, certainly in a DHCP environment where the IP could be re-assigned to a different MAC in the event the host is asleep when the lease expires.
You could use a combination of ping and arp to retrieve the MAC for a given IP. That's probably what the Windows utility is doing.
I think what you mean is I have to send an arp to the machine which I want to wake up and using `wakeonlan` to wake it with it's IP Address and MAC Address right?
If your router still has ssh able to accessed from wan and you don't mind all the security risks of all this then you can ssh usually to router then perform some tasks.
In any of this there is a high chance that wan scammers will get into your lan and wake your computer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.