What's new

Turn PC on remotely

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

smallclone

Occasional Visitor
Hi Guys. I'd like to be able to turn on my PC remotely to automate tasks. My situation is:

-I have An Asus RT-N66U
-Firmware: 376.49_4
-My DDNS:AB181D081870963FE9CEF8FBAE99976E.asuscomm.com
So I'm guessing this is switched off orthere is a problem with it.

So Can I change this to be able to turn my PC on through ASUS ICloud, and will this compomise my entire system with security breaches?

Many thanks.
 
Hi Guys. I'd like to be able to turn on my PC remotely to automate tasks. My situation is:

-I have An Asus RT-N66U
-Firmware: 376.49_4
-My DDNS:AB181D081870963FE9CEF8FBAE99976E.asuscomm.com
So I'm guessing this is switched off orthere is a problem with it.

So Can I change this to be able to turn my PC on through ASUS ICloud, and will this compomise my entire system with security breaches?

Many thanks.
Yes you can use AiCloud for this, but it requires the https port to be open so even though that's supposedly secure, it does expose you to potential attacks.
--
bc
 
Im not sure how this would be done with consumer hardware but for me i block all access from WAN except for VPN server. I use mikrotik and use the VPN server so whenever i need to use remote control and wake up a server i would just create a VPN connection to my router and than use my router to send magic packets to the host i want to wake up. Im also trying to set up automatic wake up and sleep whereby the router will wake up the targetted host if there is traffic that is directed to it but the issue im having is that i have to implement traffic detection on layer 2 and scripts because of how different my ISP works.

I would suggest not relying on services that rely on SSH or SSL being usable from WAN because a brute force attack can potentially use up all your router's CPU just to calculate all those SSH or SSL encryptions for every login attempt.
 
Thank you. Can you describe the instructions on how I would do this.

I've turned "cloud disk" on, but no idea what to do next.

thanks
 
If you want to learn about your router, you could connect to your home network with vpn (pptp is easiest) and SSH into your router with plink (a program included with putty) to execute a command script on the router to wake the computer. Or you could enable SSH from wan and do it without the vpn, perhaps you should change the ssh port then. If you install putty (plink is included with putty) you can call the following command from the directory putty is in (I use a windows batch file to do this the comand is all one line):

plink -ssh yourddns.asuscomm.com -P yourport -l yourusername -pw yourpassword /jffs/scripts/yourwakescript

The default port is 22 if you don't change it. Username and password are what you use to log into your router.

The file yourwakescript should contain:
#!/bin/sh
/usr/bin/ether-wake -b -i br0 aa:bb:cc:dd:ee:ff

Use the mac address of the desired device instead of aa:bb:cc:dd:ee:ff
Of course, you would have to have jffs enabled and have the knowledge to create a simple text file to be placed on the router. SSH on the router would also need to be enabled.
 
Thanks for that. Unfortunately I've not got the know how to even know where to begin. My problem I think is that I'm "double Natted" whatever that means.

The DDNS side of things says "Invalid IP address" and

"The wireless router currently uses a private WAN IP address (192.168.x.x, 10,x,x,x, or 172.16.x.x).
This router may be in the multiple-NAT environment and DDNS service cannot work in this environment."

Any idea how I can fix it without delving into too technical things, i.e. - within the Asus dashboard?
 
Would it have anything to do with me having another router, acting as an access point with the ip address: 192.168.1.2
 
Would it have anything to do with me having another router, acting as an access point with the ip address: 192.168.1.2

How are you connecting, example after isp what else exactly come between in them. However from what you are describing it looks like one router is behind another one would be double NAT.
 
Hi Guys. I'd like to be able to turn on my PC remotely to automate tasks. My situation is:

-I have An Asus RT-N66U
-Firmware: 376.49_4
-My DDNS:AB181D081870963FE9CEF8FBAE99976E.asuscomm.com
So I'm guessing this is switched off orthere is a problem with it.

So Can I change this to be able to turn my PC on through ASUS ICloud, and will this compomise my entire system with security breaches?

Many thanks.

Hi,
I understood from your message that you "simply" want to remotely turn your PC on and then take control of it ; well this is what I am doing basically almost on a daily basis, and I will summarize how I do it.
1. you need to make sure you PC BIOS allows for wake-on-lan and of course you need to turn this switch on in the BIOS
2. you need to assign a static ip address to this PC on your router
3. you need to make sure your PC will be kept in the internal ARP table of the router : go to ssh on the router and issue arp command
4. you need to define a portforward to make sure the wake-up packet will go the your PC, for e.a forward external port 19999 to internal port 9 to your PC ip static address
5. you need to define a DDNS to be able to access your PC over internet while your router's WAN IP may change
6. if your PC is windows, you need to make sure your LAN card will accept to be waken-up by magic paket
7. use any application (from a smartphone, tablet or other PC or even via internet directly) to issue the wake-up packet to your PC ; for example, under windows, the WakeOnLANGui soft is doing this very easily
8. take control of your PC via the way you prefer (personnaly, I use teamviewer)
9. when you are done, shutdown your PC and when you need it back, goto 7 ....

That's it.

Hope this helps,
Rgds,
GS
 
I think you need to simplify your setup and get things working before you worry about waking computers. I would take the access point out of the equation altogether for now. Once that is done, I will assume you have a coax cable from your wall connected to a cable modem. The cable modem has an ethernet cord that is then connected to the WAN (yellow) port on the back of the N66U.

Is this how things are set up? If you are getting the error with that setup, it may mean your modem is not in bridged mode- do you own the modem or is it rented? This problem often happens when customers connect their routers to cable company combo cable modem/router setups. If that is the case, the cable modem/router combo is giving the N66U a local IP address.

Remember- the more information you give us about your setup the better someone will be able to help you.
 
If you are getting the error with that setup, it may mean your modem is not in bridged mode- do you own the modem or is it rented? This problem often happens when customers connect their routers to cable company combo cable modem/router setups. If that is the case, the cable modem/router combo is giving the N66U a local IP address.

Remember- the more information you give us about your setup the better someone will be able to help you.

Thanks, this was the problem. Which is weired as I haven't even been in to the settinsg since I switched it to bridged mode about 4 years ago.

Anyway, I'll now get on and try GPsock's instructions. Many thanks.
 
If you install putty (plink is included with putty) you can call the following command from the directory putty is in (I use a windows batch file to do this the comand is all one line):

plink -ssh yourddns.asuscomm.com -P yourport -l yourusername -pw yourpassword /jffs/scripts/yourwakescript

The default port is 22 if you don't change it.

Hello!

I try to run a batch file from WN7, but when I run the batch file the script isn't called (it is executable).

If I try to change the first part "putty -ssh yourddns.asuscomm.com -P yourport -l yourusername -pw yourpassword /jffs/scripts/yourwakescript" I get en error: "incorrect port number".

I appreciate any help!

Thanks
 
Hello!

I try to run a batch file from WN7, but when I run the batch file the script isn't called (it is executable).

If I try to change the first part "putty -ssh yourddns.asuscomm.com -P yourport -l yourusername -pw yourpassword /jffs/scripts/yourwakescript" I get en error: "incorrect port number".

I appreciate any help!

Thanks

First off, I would make sure the script runs by itself. Putty into the router and type the command /jffs/scripts/yourwakescript and see if it runs/does what you want. The default port for ssh is 22.

Also, very important, is that the command is plink, not putty! You should have the plink executable in the same directory as putty, if not download the full putty.zip and put it there.

You can also run something like this from a batch file, but I like plink better because the script is run off a file from your router instead of your windows box-

c:
cd c:\your\putty\directory
start putty.exe yourusername@yourdyndns.asuscomm.com -P probably22 -pw yourpassword -m c:\your\batch\directory\whateverfile

Another reason I am not fond of running the commands from windows (notice the c:\) is that whateverfile MUST BE IN LINUX format (for me, at least), which can be a pain to get right in windows. This has to do with invisible characters at the end of lines (must be LF not CRLF like windows likes for text files), so I find it easier to run scripts from the router's jffs using plink. However, whateverfile need only contain the commands, no need for the bash at the beginning. I guess there are advantages of both methods, choose your flavor!
 
Last edited by a moderator:
First off, I would make sure the script runs by itself. Putty into the router and type the command /jffs/scripts/yourwakescript and see if it runs/does what you want. The default port for ssh is 22.

Also, very important, is that the command is plink, not putty! You should have the plink executable in the same directory as putty, if not download the full putty.zip and put it there.

The script runs OK if I started it manually.

I've downloaded the all folder putty.zip. The programs and batch file (.bat) are in the same folder, but when I start the .bat file I see for a second a message "Fatal error"

Thank you!
 
Plink uses SSH, which has to be turned on in the router firmware. Log into your router via a web page and go to the Administration >> System tab (click on Administration tab on left, then System tab in row on top). Scroll down and there will be an option- change enable SSH to Yes then be sure to scroll down and click Apply or your changes will not be entered into the firmware. You can also change the port here, the default is 22 some suggest if you change it use a port number below 1024.
 
Plink uses SSH, which has to be turned on in the router firmware. Log into your router via a web page and go to the Administration >> System tab (click on Administration tab on left, then System tab in row on top). Scroll down and there will be an option- change enable SSH to Yes then be sure to scroll down and click Apply or your changes will not be entered into the firmware. You can also change the port here, the default is 22 some suggest if you change it use a port number below 1024.

I already use ssh from PC (Putty) and phone (JuiceSSH - Android) and everything works fine.

I use a custom port, not the default one.

I forgot to mention that I use a SSH Authentication key. Maybe because of that the .bat file doesn't run?

I don't know what I do wrong.

Thank you!
 
Last edited:
I don't currently use a key for ssh authentication so I cannot give you a specific answer here, but it looks like at the very least you will need to insert a flag into the plink command in the batch file, something like-

-i C:\location\ofyour\key.ppk

@smallclone- looks like we took a tangent on your thread- have you got things working?
 
I don't currently use a key for ssh authentication so I cannot give you a specific answer here

It works fine after changing "Allow SSH password login" to "Yes".

Thank you for your support!

Edit: I've found a solution:
- save a profile "Test" in Putty
- in batch run: "plink -load Test /path/to/your/file".

So I can use SSH Authentication key.
 
Last edited:

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top