What's new

Need Wake On LAN from the WAN side

  • 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!

bbsc

Regular Contributor
I have a PC in my network and need to wake it from the WAN side from time to time.
The PC itself has no problem with WOL and even WOL from S5.
Everything is working excellent when waking it from LAN or via PPTP VPN or via OpenVPN.

But I need to wake it directly from WAN for some reasons and I'm stuck with this problem.
I've made a proper record on http://router_ip/Main_WOL_Content.asp.
I've add a rule to redirect port 9 UDP to the PC's IP on http://router_ip/Advanced_VirtualServer_Content.asp.
But it still doesn't work.

Any suggestions?
Thank you in advance.

P.S. RT-N66U, Merlin's 380.59.
 
Thank you for the reply.
No luck with static arp so far.

If I understand correctly, the router must broadcast the "magic" packet to LAN which it receives on port 9 from WAN.
The question is how to make it to do so?
 
Log into your router through WAN and wake your machines from webUI! Why not?
Or if I understood you wrong, your PC that needs to be woke up isn't physically connected to asus router network?
 
Because this functionality is not for me but for another person.
This person only uses this PC in my network and this PC is only used but this person.
Several IP ports forwarded is everything needed for the job. No extra rights or logins.
The PC is connected to the router via "green" switch but WOL works excellent from another PC in the same network or from the router itself.

So I'm searching for a technical solution how to forward UDP port 9 to the broadcast address 192.168.1.255.
 
Last edited:
So far made a static arp for the PC and tried:
1. Forward port 9 UDP to 192.168.1.10:9 UDP (10 is the PC's ip).
2. Forward port 3999 UDP to 192.168.1.10:9 UDP. The "magic" packet was sent to port 3999, of course.
3. Forward pord 9 and 3999 UDP to 192.168.1.255:9 UDP.

Nothing works :(
 
Hello
I normally use WOL from WAN side to turn on one fo my PCs.
I added the static arp in nat-start JFFS script and I forwarded UDP port 9 to the PC IP (assigned statically by DHCP)

Did you check with a WOL monitor (Google for a free one) on the destination PC if it actualy receives the magic packet when it is already turned on?

If you do not receive the magic packet then you should investigate in the port mapping section, but if you receive it, then you should verify on your PC how to enable wol in it's sleep state.

You could also try to send WOL magic packet from another pc on your lan to see if the destination PC actually receivs it and turns itself on



Best Regards
Ocram59
 
Last edited:
I normally use WOL from WAN side to turn on one fo my PCs.
I added the static arp in nat-start JFFS script and I forwarded UDP port 9 to the PC IP (assigned statically by DHCP)
So did I.
What router do you have and what's the firmware's version?

Thank you for the reply.
 
So did I.
What router do you have and what's the firmware's version?

Thank you for the reply.

Hi
RT-N66u with Merlin fork 374.43_2-17E8j9527 by John
But WOL used to work since ever either trough Asus original firmware either trough plain Merlin's, before I began to use John fork because of wifi old drivers (maybe not so sure about Original Asus Fw because I switched to Merlin quite soon)
(Sorry only now I realize that you already tried what I suggested to try)


Regards
ocram59
 
So far made a static arp for the PC and tried:
1. Forward port 9 UDP to 192.168.1.10:9 UDP (10 is the PC's ip).
2. Forward port 3999 UDP to 192.168.1.10:9 UDP. The "magic" packet was sent to port 3999, of course.
3. Forward pord 9 and 3999 UDP to 192.168.1.255:9 UDP.

Nothing works :(

I'm newbie on all this router and custom firmware and too had problem WOL remotely. How's your static arp in scripts? I'd it exactly like WOL - DDWRT wiki "
arp -i br0 -s 192.168.1.254 FF:FF:FF:FF:FF:FF" and it worked for me.

  • Do not change the FF:FF:FF:FF:FF:FF MAC address; this is a special MAC address used when broadcasting. WOL magic packets are constructed using the MAC address of the target computer, but should be and almost always are sent via broadcast; the MAC address used here controls with how the packet is sent, not how it is formed.

Sorry for being newbie and stepping into advanced toes ;)
 
Don't. WOL over WAN is always a bad idea. Random scanning will constantly bring your computer out of sleep. Use a VPN tunnel instead.
 
Ok, the problem is solved.
It appeared to be my fault, after all.
I've always used broadc.exe under windows and ether-wake under linux.
Don't know what's wrong with these tools, but Wake-On-Lan works from Android.
And this tool works under Windows.

Static arp and port 9 UDP forwarding are necessary and sufficient conditions.
Tested under 380.59 and John's 17E8.

Thanks for everybody for patience and tips.
 
Straight up (no vpn, ssh, gui) WOL from WAN was always unreliable for me. Some routers along the path just don't want to send those magic packets along. So sometimes it would work- sometimes not. ;) For me, VPN is the only reliable way (or logging into the router gui/ssh from WAN) I have found to WOL from WAN.
 
VPN is the only reliable way (or logging into the router gui/ssh from WAN)
You're right.
That's why there are admins and there are common users.
Admins can login via VPN or SSH and solve complicated but (as they hope) rare problems.
Users just use things which are needed for their work.

I just give an opportunity to user to solve small problems by himself without extra credentials. But I still have a phone and e-mail.
 
Last edited:
Don't. WOL over WAN is always a bad idea. Random scanning will constantly bring your computer out of sleep. Use a VPN tunnel instead.
Hi, just signed up to this forum and in search for help with setting up WoL over WAN/OpenVPN. Sorry for using this pretty old thread if it's against the rules? I've used almost two working days now with reading countless different posts on various forums and sites without getting much closer to solve what I'm after. What I would like is (if at all possible?) to have WoL work remotely using OpenVPN with TUN setting. I get it to work without problem if I switch over to TAP but what I'm after is to get WoL to work from Android and from what I now have learned is that TAP doesn't work with Android. Read somewhere that it does but after trying I soon gave up. And I'm pretty sure the TAP/Android route is a dead end?! I've a RT-56U with the stock Asus firmware "3.0.0.4.382_50624" with an OpenVPN server setup and there's no problem with WoL inside the local LAN. WoL is also working without a problem from the ASUS stock GUI.I'm aware of "custom firmware" like DD-WRT and MerlinWRT but I'm not so sure that changing to one of these would help? I'm not very "tech savvy" but understand some basics, like firmware is Linux based but not much more than that. Linux commands and scripts and the likes is above my level if they are not very detailed instructions of how to apply them. If someone know how to get WoL to work over OpenVPN with TUN setting and would like to help out I would appreciate it very much. I kindly opt out for answers like "why don't you just use the web GUI then". Please, be constructive.
 
Hi, just signed up to this forum and in search for help with setting up WoL over WAN/OpenVPN. Sorry for using this pretty old thread if it's against the rules? I've used almost two working days now with reading countless different posts on various forums and sites without getting much closer to solve what I'm after. What I would like is (if at all possible?) to have WoL work remotely using OpenVPN with TUN setting. I get it to work without problem if I switch over to TAP but what I'm after is to get WoL to work from Android and from what I now have learned is that TAP doesn't work with Android. Read somewhere that it does but after trying I soon gave up. And I'm pretty sure the TAP/Android route is a dead end?! I've a RT-56U with the stock Asus firmware "3.0.0.4.382_50624" with an OpenVPN server setup and there's no problem with WoL inside the local LAN. WoL is also working without a problem from the ASUS stock GUI.I'm aware of "custom firmware" like DD-WRT and MerlinWRT but I'm not so sure that changing to one of these would help? I'm not very "tech savvy" but understand some basics, like firmware is Linux based but not much more than that. Linux commands and scripts and the likes is above my level if they are not very detailed instructions of how to apply them. If someone know how to get WoL to work over OpenVPN with TUN setting and would like to help out I would appreciate it very much. I kindly opt out for answers like "why don't you just use the web GUI then". Please, be constructive.
I used to use TeamViewer with no problems after getting it setup.
 
You do not need "learn" anything. Just read above: https://www.snbforums.com/threads/need-wake-on-lan-from-the-wan-side.33564/#post-270104
Wake-On-Lan Android app works via TUN and via TAP.

P.S. TAP is possible under Android. But it requires a rooted device.

Thanks for answering "bbsc", as I said I read quite a lot before getting into this thread. It's actually from your input that I downloaded that same app on my Android device. So if I get you right; you have a router setup as an OpenVPN server with TUN setting and when connecting with your Android device remotely to your OpenVPN server you can use WoL to wake up clients inside the LAN? Well in my setup it doesn't work with TUN and I would not fancy root my device. Since you asked "ocram59" the same Q earlier, may I ask what HW & SW you use that is working with OpenVPN and TUN? My setup is not working with TUN. Do you also have a Asus router with stock firmware?
 
I use this script, which I called jffs/scripts/ovpn-client-connect.sh. Make it executable:
Code:
#!/bin/sh
# Don't allow  admin user to login via ovpn if you use a password weaker than your ovpn password
[ $username == "put.in.the.admin.username.here" ] && exit 1
logger "VPN client connected!"
# MAC address of the device you want to wake up
/usr/sbin/ether-wake -i br0 -b "xx:xx:xx:xx:xx:xx"
exit 0
Then in the custom config of the server, put:
Code:
script-security 2
client-connect /jffs/scripts/ovpn-client-connect.sh
Each time you make a VPN connection (works fine for me either TUN or TAP), the script will wake up the server. You can add additional lines to add additional servers.
 
I use this script, which I called jffs/scripts/ovpn-client-connect.sh. Make it executable:
Code:
#!/bin/sh
# Don't allow  admin user to login via ovpn if you use a password weaker than your ovpn password
[ $username == "put.in.the.admin.username.here" ] && exit 1
logger "VPN client connected!"
# MAC address of the device you want to wake up
/usr/sbin/ether-wake -i br0 -b "xx:xx:xx:xx:xx:xx"
exit 0
Then in the custom config of the server, put:
Code:
script-security 2
client-connect /jffs/scripts/ovpn-client-connect.sh
Each time you make a VPN connection (works fine for me either TUN or TAP), the script will wake up the server. You can add additional lines to add additional servers.

Err...
I've a RT-56U with the stock Asus firmware "3.0.0.4.382_50624"
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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