Control a remote machine
Q I have a PC in my father's home that I do not want to leave on 24 hours a day. So I would like to be able to turn it on and shut it down from my house. That computer is running Windows XP, while I am using Slackware 12.0 here. Is this possible?
A All you need to turn the computer off is to run some sort of remote desktop software, then you can log in and turn off from the Start menu just as you would if you were sitting in front of the computer. If the computer is running XP Home, VNC (Virtual Network Computing) is a good choice. TightVNC (www.tightvnc.com) is an implementation of this aimed at slower internet links. Install this on the Windows computer and set the server to run on the Windows box. In this case, you need to forward ports 5800 and 5900 in your router and firewall. If you are using KDE, you can use KRDC to connect to VNC as well as RDP desktops, otherwise install TightVNC on your Slackware box and use that to connect to the Windows desktop.
Turning the computer on uses a completely different technology called Wake-on-LAN. When the computer is turned off but still connected to power, it listens on its network interface for a 'magic packet' - a specific sequence of bytes. When it receives this, it turns itself on. This requires support for Wake-on-LAN in the motherboard's BIOS. Most recent BIOSes support it, but it is often disabled by default, so you'll need to find the option in your BIOS setup menus to turn it on. If you have an onboard NIC, that's all you have to do, but if you are using a PCI network card you will need to use the supplied cable to connect its Wake-on-LAN header to the one on the motherboard.
Wake-on-LAN uses port 9, so forward that from your router to the broadcast address for your network. This will only work if you have a separate modem/router that is always powered up. It must also connect to the computer via Ethernet, as Wake-on-LAN only works with Ethernet adaptors. Finally, you need the hardware address of the Ethernet adaptor on the Windows computer, which you can get by running ipconfig in a DOS box. With this information, you can run the wakeonlan script from http://gsd.di.uminho.pt/jpo/software/wakeonlan with
wakeonlan -i [ipaddress of server] [MAC address]
wakeonlan -i 188.8.131.52 00:0C:29:55:B0:C1
The IP address you use with wakeonlan or TightVNC must be your external facing address, not the internal LAN address of the individual computer. Since most ISPs use dynamic addressing, you need to use one of the dynamic DNS services, search the web for them, to map a set domain name to the dynamic address, unless you are lucky enough to have an ISP that offers static addresses. Wakeonlan should work with your Dynamic DNS hostname instead of the IP address. If it does not, ping or dig the hostname to get an IP address.
Follow us on Identi.ca or Twitter