This assumes that wakeonlan is already installed on the gateway server. Just change 01:02:03:04:05:06 to the actual MAC address of the machine you want to turn on. However, there is no way to do this without first logging in to the gateway server. Scroll down in the list to find Wake on Magic Packet. Right mouse click on the network card and go to Properties. Your machine should now support wakeonlan. Enable Wake-On-LAN in your OS: For Windows 7/10: Open Start menu. Now, run sudo nano /etc/network/interfacesĪnd add this line to the end of the file: post-down /usr/bin/wakewol Save the file and run sudo chmod 755 wakewol to make it executable. Now, set up the machine to allow it: sudo nano /usr/bin/wakewolĪdd these lines to the file you just created: #!/bin/bash If the output of ethtool contains a line like Supports Wake-on: g, you should be fine. From the target machine, run sudo aptitude install ethtool Once you finish you can then Remote Access your PC and shut it down to save power.You will need to be able to ssh to the gateway, from there, assuming your network cards support it, you will be able to turn your machines on.įirst, make sure your network cards support wakeonlan. You can then connect using an SSH client on your phone, run the script to wake up the PC running the PLEX Media Server and enjoy your media when you are outside your house using the PLEX app on your phone. If you have a PC in your home that you run PLEX Media Server on but don’t want to leave it running 24/7 you can configure a Raspberry Pi with remote SSH access and have this script on it. You can do lots of cool things with this script. To enable SSH access to gain remote access on a network machine you need to have a read through these posts if you are not sure how any of this works: You can find SSH clients for your Android/iOS device which you can install to enable you to access your Raspberry Pi remotely and run terminal commands such as this script. That default file uses ethtool to configure WOL for all interfaces to 'g' (magic packet) alone. If you have a Raspberry Pi running in your home network (as a VPN or for any other task) you can transfer this script onto your Raspberry Pi and run it through SSH to wake up devices in your network while you are outside your network. This is my (somewhat verbose, and functionally trivial) /etc/pm/power.d/disablewol: Override the file /usr/lib/pm-utils/power.d/disablewol which manually configures Wake On Lan (WOL) settings for interfaces. See this post here for more details) in your network. Now you can use this script to wake up devices (you need of course to have Wake on LAN functionality enabled on these devices. Last step is make sure that the script is executable. You can add or remove sections for devices accordingly. Your server that is 'sleeping' does not have an. Basically, you ssh into a system on the same local network as your server to wake and use the MAC address to wake it. You can also name your devices for easy reference. You need to have access to at least one computer (or router) on the LAN, and send the wake-up arp package from that. Then you need to input the MAC addresses and the correct ports of the devices you are waking up using the script. If || thenįirst thing you need to do is edit the command path to reflect where WOL was installed in your system as above. Edit command path and port number.Įcho "d) Wake Device 2, wait 15sec, then wake Device 1"Įcho "Device 2 sent, now waiting for 15sec then waking Device 1" Once youve added your computer to the app, its time to see if it works. # Edit echo lines to reflect what you want to do. Choose a nickname for the device and choose the appropriate Wi-Fi network. # Definition of MAC Addresses (Change Device Name and MAC Address) If you are doing this in a text editor make sure that no extension (i.e *.txt) is saved. Copy the script below and save it on your computer. Now it’s time to edit the script to your needs. Just run: whereis wolĭepending on your Linux distro this will either be installed in /usr/bin or in /usr/local/bin Now that WOL is installed in your system we need to find where the command is placed. Extract the tar.gz archive, cd into the directory and run: make Then you just need to build it from source.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |