Wake on Lan from via a router and access point using Teamviewer

aem2070

Distinguished
Sep 23, 2015
12
0
18,510
Hello,
I am trying to set up Wake on Lan for my PC using Teamviewer. I have a router provided by the ISP (Model: ZXHN H108N V2.5), nothing is connected to this router except for a Lan cable connected to the access point (Model: DIR-605L). My Pc is connected to the access point (DIR-605L) via a Lan cable. I tested the Wake on Lan function for my network card and it's working properly (works only when waking the PC from a device connected to the same network via wireless using Teamviewer). I also have a static IP provided by my ISP.
On the access point settings, i use DHCP Reservation and assign a specific IP address for my PC.
It seems there is a missing piece in my configuration between the router, the access point, and "port forwarding", which i don't know much about.
How can i complete the configuration in order to be able wake my PC remotely.
Thanks in advance.
 
Solution

If the device is...
You have things configured very wrong if the device you say is a AP has any DHCP settings at all. That device should have no concept of IP addressees other than the 1 IP you use just to manage it. A AP is best thought of as a dumb switch that has wireless ports.

I am assuming you are using teamviewer to access say PC "A" which then send the WoL signal to wake PC "B". That method will work, any attempt to run WoL directly from the internet will have massive issues because there is no such protocol as wake on "WAN"
 
  • Like
Reactions: zoozoo
This is tested and works for me, using TeamViewer 13

You really dont want two routers in a setup like this, why do you have the d-link at all if the ISP provided box acts as a router as well? Are you sure there isnt a third box from the ISP? (else Ill assume the ZXHN is modem/router combo). Either way, these two devices need to be on the same subnet (e.g your ISP box shouldnt be a 192.168.0.1 while the Dlink is a 192.168.1.1)

Worth a shot anyhow..

1) Go the the options, configure Wake on LAN, select public address and put your public static IP in there (google "what is my IP"), leave the port on 9

2) Assuming you already have a static address in your PC's IPv4 settings, if not you need to set one. check by opening command prompt and type "ipconfig /all" (no quotes) it will tell you your IP and whether you're using DHCP or not (it will show disabled if you have a static address configured).

3) Log into your d-link device and go to port forwarding. You want to forward port 9 to your IP address in step 2 over UDP, save that.

4) install TV on your phone, connect via LTE (not wifi) to test. Try turning PC on (must be in sleep/hibernate to work on most PC's, unless you have already seen it work locally being totally powered off)
 
Does your teamviewer not work remotely? Teamviewer shouldn't need port forwarding. Teamviewer's company brokers the connection to your LAN so you aren't forwarding ports. Your "server" already opens a connection to teamviewer's corporate server which lets your clients in outside your NAT. It's called a firewall pinhole.

The computer on your LAN with teamviewer needs to be available in order to send WOL packets over your network. You won't be able to wake that computer if it's where all your WOL packets originate.
 
Thanks "Beezy" for your detailed reply.
Let me clarify things part by part


I use the d-link as it has several useful features for me such as bandwidth control, which i use to provide equal bandwidth for my devices on the network (PC - Laptop - Mobile).
The router [192.168.1.1]
D-Link [192.168.0.1]

Regarding the mentioned steps, i did all of them, but still the Wake on Lan is not working.

 


In case Wake on Lan to be done using Teamviewer remotely, not within the network, it requires port forwarding in its configuration and the static IP address. That's why i mentioned port forwarding.

 
It will not work because you are attempting wake on WAN which does not exist.

People "think" they can make it work with port forwarding but it only will work for a short time.

The problem is the WoL only uses mac addresses. There is no concept of IP addresses or port or UDP or TCP. Way too much misinformation out there including from people that write the client applications that send the WoL packet.

The reason it does not work using the port forwarding hack is the ARP table entry will timeout in the router and it no longer know where to send the data.

 
  • Like
Reactions: zoozoo


You should be able to log into a computer remotely and trigger a WOL program on the LAN. Get one working on the computer you are controlling and it will work. The app might be easier to use once working, but this will work.

I've not used their WOL app, it might not use a pinhole. It's likely needing the port forwarding for the computer running teamviewer. The program on that computer should be managing all the WOL on your network.
 


I don't have a computer always on and connected to the network in order to use it to wake up another computer, It's just my home network and all i'm trying to get is to wake up my pc from shutdown remotely.
If you have any suggestion to do that, even without teamviewer, i would try it.
Thanks.
 


So you're saying i can't do that as long as my pc is connected to the AP, the only way would be to connect the pc to the router itself ?
 

If the device is really running as a AP then it is all one lan and is the same as if it was connected directly to your router.

You could for example use a cell phone connected to the wifi to wake your pc. What will not work is if you attempt to wake your pc from your phone that is connected to say the mobile broadband network. Anything that must come in from the internet is Wake on WAN which does not exist.

Generally the best solution I have seen for this problem is asus routers have a feature that lets you log into the router from the internet and then ask the router to send the WoL packet to the end pc. Not sure if other routers offer this feature or not.

Even when you get everything right WoL is very messy to get working. Microsoft and BIOS manufactures have implemented a bunch of microsofts sleep/suspend stuff. This used to work very well but it seems microsoft drivers can set thing in the BIOS that mess up WoL.
 
Solution


Thanks for the clarifications. I will try to read more about this.
All i have tried till now is connecting the PC directly to the router and WoL worked fine after configuring a static IP and port forwarding. I was able to wake it up from treamviewer on my mobile phone (LTE).

 


This configuration should be possible, but the two router deal makes things difficult for you. Like I said before, they need to be on the same subnet. (192.168.0.1 vs 192.168.1.1)

Option 1) You will need to change your Dlink to have an IP address of 192.168.1.2 putting it the same subnet. This will also change the IP schema for everything connected to the Dlink. If DHCP is enabled on the D link, it will need to hand out addresses like 192.168.1.100 -- additionally, anything that you currently have connected to the Dlink that has manual/static IP configuration would need to be updated also. You will keep the forwarding rule on the Dlink router.. Its even *possible* you would actually need to double port forward with this setup ..

Option 2) you could configure your Dlink to run as an access point instead (it wont create a LAN network, no DHCP handing out addresses). In that case you would use the IP schema of the ZTE box (192.168.1.1) for the Dlink (e.g 192.168.1.2). With this option you would do the port forward rule on the ZTE box instead of the Dlink.
https://www.justanswer.com/computer-networking/79ib6-dir-605l-acess-point.html

Option 3) get a switch to replace the Dlink router (assuming the ZTE box is truly a router handing out DHCP addresses). You will lose your features the Dlink provides though, unless you got an expensive switch. You can figure this out by connecting a laptop directly to the ISP box and see what address you get. It should be something like 192.168.1.100.

I would opt for Option 2 unless its too difficult for you to get logged into your ZTE box (you currently wont be able to log into that ISP box from anything connected to the Dlink, you will need to directly connect to the ISP box to access it and create the port forward rule)

Update: Based on bill001g's comments, make sure your MAC address is in the address reservation. You mentioned you had already created a reservation in your original post, but the MAC can't be empty for WOL to work (properly).