Jump to content

Hi,

I have a desktop PC at home that I would like to access from my laptop while I'm away at school. TeamViewer is the obvious solution to this, but only works when the computer is online. I found out about Wake On LAN, which can, as it states, wake up your computer from sleep or even complete shutdown (after, say, a power outage) and make it accessible from your other device. I've gotten this to work over a local network, but it's apparently possible over external networks. Could anyone guide me to a place to figure out how to configure my router/Teamviewer for remote use? I couldn't find anything that explained everything I needed.

Link to comment
https://linustechtips.com/topic/425493-setup-wake-on-lan-with-teamviewer/
Share on other sites

Link to post
Share on other sites

There's a guide here: http://www.howtogeek.com/192642/how-to-remotely-turn-on-your-pc-over-the-internet/

They mention UDP ports 7 and 9.

 

 

The Port-Forwarding Method

Wake-On-LAN uses UDP. Many utilities use ports 7 or 9, but you can use any port you like for this. You’ll need to forward a UDP port to all IP addresses behind your router — you can’t just forward to a specific IP address. The Wake-on-LAN packet must be forwarded to every device running behind your router, and a device will only wake up if the information in the WoL packet matches it. This is known as a “subnet directed broadcast.”

To do this, you’ll need to forward the port to the “broadcast address,” which will broadcast the packet to all computers on a network. The broadcast address is 192.168.*.255. For example, if your PC has the IP address 192.168.1.123, you’d enter 192.168.1.255 as the broadcast address. If your PC has the IP address 192.168.0.123, you’d enter 192.168.0.255 as the broadcast address.

 

Personally if I was going about something like this, I'd have a computer/IoT device always on indoors, such as a Raspberry Pi. Then, when I open a particular webpage on the device, or send encrypted credentials etc, it would run a python script to send the "magic packet" (The destination computer's mac address) out to every device on the internal network, causing the PC to power on. I wouldn't broadcast my computer's mac address out on the internet, way too risky in my opinion.

Speedtests

WiFi - 7ms, 22Mb down, 10Mb up

Ethernet - 6ms, 47.5Mb down, 9.7Mb up

 

Rigs

Spoiler

 Type            Desktop

 OS              Windows 10 Pro

 CPU             i5-4430S

 RAM             8GB CORSAIR XMS3 (2x4gb)

 Cooler          LC Power LC-CC-97 65W

 Motherboard     ASUS H81M-PLUS

 GPU             GeForce GTX 1060

 Storage         120GB Sandisk SSD (boot), 750GB Seagate 2.5" (storage), 500GB Seagate 2.5" SSHD (cache)

 

Spoiler

Type            Server

OS              Ubuntu 14.04 LTS

CPU             Core 2 Duo E6320

RAM             2GB Non-ECC

Motherboard     ASUS P5VD2-MX SE

Storage         RAID 1: 250GB WD Blue and Seagate Barracuda

Uses            Webserver, NAS, Mediaserver, Database Server

 

Quotes of Fame

On 8/27/2015 at 10:09 AM, Drixen said:

Linus is light years ahead a lot of other YouTubers, he isn't just an average YouTuber.. he's legitimately, legit.

On 10/11/2015 at 11:36 AM, Geralt said:

When something is worth doing, it's worth overdoing.

On 6/22/2016 at 10:05 AM, trag1c said:

It's completely blown out of proportion. Also if you're the least bit worried about data gathering then you should go live in a cave a 1000Km from the nearest establishment simply because every device and every entity gathers information these days. In the current era privacy is just fallacy and nothing more.

 

Link to post
Share on other sites

There's a guide here: http://www.howtogeek.com/192642/how-to-remotely-turn-on-your-pc-over-the-internet/

They mention UDP ports 7 and 9.

 

 

Personally if I was going about something like this, I'd have a computer/IoT device always on indoors, such as a Raspberry Pi. Then, when I open a particular webpage on the device, or send encrypted credentials etc, it would run a python script to send the "magic packet" (The destination computer's mac address) out to every device on the internal network, causing the PC to power on. I wouldn't broadcast my computer's mac address out on the internet, way too risky in my opinion.

I happen to have a Pi, how would I set this up? Also, how would I turn the pi back on if, say, the power goes out?

Link to post
Share on other sites

I happen to have a Pi, how would I set this up? Also, how would I turn the pi back on if, say, the power goes out?

 

The pi automatically turns on and scans itself for corruption after an unexpected power-cut. The results are available in the system log. I found this python script on google: http://code.activestate.com/recipes/358449-wake-on-lan/ Don't forget to change the MAC address to the computer you want to wake.

 

To run the python script when a webpage is accessed, you'll need to install a webserver and PHP first. Don't install MySQL as you won't need it.

Found an excellent guide here: http://www.instructables.com/id/Setup-a-Raspberry-Pi-PHP-web-server/step5/Install-Lighttpd-PHP/

 

After installing the webserver, go to the webserver home directory, and save the python script there. Then create an index.php file. This file will contain code to start the python script.

<?   exec("python PythonScriptNameHere.py"); //python script name here   echo "The script has finished running"; //this doesn't appear until the python script finishes running?>

The desktop computer needs to be connected to ethernet for WOL to work. It isn't possible over WiFi because that is powered off in sleep/shutdown, as well as protocol overhead.

Speedtests

WiFi - 7ms, 22Mb down, 10Mb up

Ethernet - 6ms, 47.5Mb down, 9.7Mb up

 

Rigs

Spoiler

 Type            Desktop

 OS              Windows 10 Pro

 CPU             i5-4430S

 RAM             8GB CORSAIR XMS3 (2x4gb)

 Cooler          LC Power LC-CC-97 65W

 Motherboard     ASUS H81M-PLUS

 GPU             GeForce GTX 1060

 Storage         120GB Sandisk SSD (boot), 750GB Seagate 2.5" (storage), 500GB Seagate 2.5" SSHD (cache)

 

Spoiler

Type            Server

OS              Ubuntu 14.04 LTS

CPU             Core 2 Duo E6320

RAM             2GB Non-ECC

Motherboard     ASUS P5VD2-MX SE

Storage         RAID 1: 250GB WD Blue and Seagate Barracuda

Uses            Webserver, NAS, Mediaserver, Database Server

 

Quotes of Fame

On 8/27/2015 at 10:09 AM, Drixen said:

Linus is light years ahead a lot of other YouTubers, he isn't just an average YouTuber.. he's legitimately, legit.

On 10/11/2015 at 11:36 AM, Geralt said:

When something is worth doing, it's worth overdoing.

On 6/22/2016 at 10:05 AM, trag1c said:

It's completely blown out of proportion. Also if you're the least bit worried about data gathering then you should go live in a cave a 1000Km from the nearest establishment simply because every device and every entity gathers information these days. In the current era privacy is just fallacy and nothing more.

 

Link to post
Share on other sites

The pi automatically turns on and scans itself for corruption after an unexpected power-cut. The results are available in the system log. I found this python script on google: http://code.activestate.com/recipes/358449-wake-on-lan/ Don't forget to change the MAC address to the computer you want to wake.

 

To run the python script when a webpage is accessed, you'll need to install a webserver and PHP first. Don't install MySQL as you won't need it.

Found an excellent guide here: http://www.instructables.com/id/Setup-a-Raspberry-Pi-PHP-web-server/step5/Install-Lighttpd-PHP/

 

After installing the webserver, go to the webserver home directory, and save the python script there. Then create an index.php file. This file will contain code to start the python script.

<?   exec("python PythonScriptNameHere.py"); //python script name here   echo "The script has finished running"; //this doesn't appear until the python script finishes running?>

The desktop computer needs to be connected to ethernet for WOL to work. It isn't possible over WiFi because that is powered off in sleep/shutdown, as well as protocol overhead.

Would a guide like this work?

Link to post
Share on other sites

Would a guide like this work?

 

Most certainly.

Speedtests

WiFi - 7ms, 22Mb down, 10Mb up

Ethernet - 6ms, 47.5Mb down, 9.7Mb up

 

Rigs

Spoiler

 Type            Desktop

 OS              Windows 10 Pro

 CPU             i5-4430S

 RAM             8GB CORSAIR XMS3 (2x4gb)

 Cooler          LC Power LC-CC-97 65W

 Motherboard     ASUS H81M-PLUS

 GPU             GeForce GTX 1060

 Storage         120GB Sandisk SSD (boot), 750GB Seagate 2.5" (storage), 500GB Seagate 2.5" SSHD (cache)

 

Spoiler

Type            Server

OS              Ubuntu 14.04 LTS

CPU             Core 2 Duo E6320

RAM             2GB Non-ECC

Motherboard     ASUS P5VD2-MX SE

Storage         RAID 1: 250GB WD Blue and Seagate Barracuda

Uses            Webserver, NAS, Mediaserver, Database Server

 

Quotes of Fame

On 8/27/2015 at 10:09 AM, Drixen said:

Linus is light years ahead a lot of other YouTubers, he isn't just an average YouTuber.. he's legitimately, legit.

On 10/11/2015 at 11:36 AM, Geralt said:

When something is worth doing, it's worth overdoing.

On 6/22/2016 at 10:05 AM, trag1c said:

It's completely blown out of proportion. Also if you're the least bit worried about data gathering then you should go live in a cave a 1000Km from the nearest establishment simply because every device and every entity gathers information these days. In the current era privacy is just fallacy and nothing more.

 

Link to post
Share on other sites

Awesome, I'm working on it now. Thanks for the help. What's the best distro to use? I kinda blindly chose Raspbian.

 

That's the best to use on a Pi since it's well supported, and every tutorial for the Pi is pretty much guaranteed to work on it. If you run into any errors while downloading something using apt-get, try apt-get update, since the repository links change often :)

Speedtests

WiFi - 7ms, 22Mb down, 10Mb up

Ethernet - 6ms, 47.5Mb down, 9.7Mb up

 

Rigs

Spoiler

 Type            Desktop

 OS              Windows 10 Pro

 CPU             i5-4430S

 RAM             8GB CORSAIR XMS3 (2x4gb)

 Cooler          LC Power LC-CC-97 65W

 Motherboard     ASUS H81M-PLUS

 GPU             GeForce GTX 1060

 Storage         120GB Sandisk SSD (boot), 750GB Seagate 2.5" (storage), 500GB Seagate 2.5" SSHD (cache)

 

Spoiler

Type            Server

OS              Ubuntu 14.04 LTS

CPU             Core 2 Duo E6320

RAM             2GB Non-ECC

Motherboard     ASUS P5VD2-MX SE

Storage         RAID 1: 250GB WD Blue and Seagate Barracuda

Uses            Webserver, NAS, Mediaserver, Database Server

 

Quotes of Fame

On 8/27/2015 at 10:09 AM, Drixen said:

Linus is light years ahead a lot of other YouTubers, he isn't just an average YouTuber.. he's legitimately, legit.

On 10/11/2015 at 11:36 AM, Geralt said:

When something is worth doing, it's worth overdoing.

On 6/22/2016 at 10:05 AM, trag1c said:

It's completely blown out of proportion. Also if you're the least bit worried about data gathering then you should go live in a cave a 1000Km from the nearest establishment simply because every device and every entity gathers information these days. In the current era privacy is just fallacy and nothing more.

 

Link to post
Share on other sites

That's the best to use on a Pi since it's well supported, and every tutorial for the Pi is pretty much guaranteed to work on it. If you run into any errors while downloading something using apt-get, try apt-get update, since the repository links change often :)

Thanks so much, you're making my life a lot easier :)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×