Wake on WAN
I am trying to find an answer and I acknowledge that I might need a WRT capable router or similar. I just need to know what to buy.
I have an FTPSE (passive on port 21) server running on my iMac but because the server is rather low traffic I would much prefer to start putting Mac to sleep in the evenings but need it to wake when port 21 gets forwarded to the FTPSE server.
I came across this tool bit it appears to be a tool to trigger a sleeping machine to wake on the LAN side. They do however point to an interesting article on the WRT wiki page. https://wiki.dd-wrt.com/wiki/index.php/WOL#Remote_Wake_On_LAN_via_Port_Forwarding
ISP Router (not WRT-able) -->airport Express --> Extreme --> iMac (running CrushFTP)
All of this is wired.
Now, I have a really old Belkin 54G (model F5D7230-4) that I can probably sandwich some where in-between just to trigger Wake on LAN Magic packet feature through WRT but before I hack this working router with WRT are there any other recommendations?
Curiously enough, I thought the airport devices should wake up my Macs but that never seems to work even after a soft reset or power cycle.
If it can be done with Airports routers alone then no need for WRT modified routers great but I don't believe this Back to my Mac related.
Any advice would be greatly appreciated because I think I am on to something but then again I feel kind of lost.
Making some progress.
I downloaded Fing for the iPhone and then put the Mac to sleep.
Waited until the Mac was asleep and then used Fing to wake on LAN and the Mac woke up so some progress has been made. Now on to discovering how to get the Mac to wake when the router is asked to port forward 21 to the same Mac.
Needless to say the goal is to have the Mac wake from the WAN side but at least I know the Mac is waking on LAN which is a good first step.
I will update as I make progress.
Hi Stephen, thanks for the reply.
Are you aware of which router could solve this problem? I have read about SSH being a potential but trigger but the goal/solution would be FTPSE connections that need to get forwarded wake the computer.
I may have to just live with this otherwise because it is not something that I need for personal purposes but it would be for other users who need access while being less aggresive on energy consumption.
I apprecaite your time.
I am not aware of which routers might do this but expect Dave Hamilton may know as he has much greater experience of different routers. With a device that acts as a Bonjour Sleep Proxy you can use any standard protocol just to do the wake. THen you follow it with the FTPSE file transfer.
so you could do for example
ssh user@mac ls | wc
May even be able to do
ssh user@mac ls > /dev/null && sleep 30 && ftpse command
Which will run command on Mac without displling output, wait for 30 seconds then run your ftpse command
that command should get sent by the Apple TV or Airport router to the mac to run. In so doing it will wake Mac first.
I am typically trying to access my Mac using Parallels Access from my iPad Mini. My Apple TV doesn’t know about that and so doesn’t get registered to handle it. So, I try to ssh on to Mac using Prompt (app on iPad) which, being a standard protocol the Apple TV will Khios about and will wake the mac.
I think the issue is that Bonjour Sleep Proxy only wakes for certain services, and I don't think FTP is one of them. So you might need to do exactly what @sbedford mentioned and use SSH (or AFP, or something that BSP uses) to trigger the wake event.
Also, while we're here, it's been a while since I port-forwarded FTP, but I seem to remember PASV FTP required some port triggers, too, and that just forwarding port 21 wasn't enough. I just did some searching, though, and can't find anything to support my theory, so it's possible this was related to something else. 😉
Thanks for the reply. In terms of FTP, I am running CrushFTP and have it set up as an FTPSE server. The passive ports I use are 2000-2100 while the main server port is 21.
Your suggestion makes sense with respect to Bonjour not responding to port 21. I think that explains it. It's a pity. I wish Bonjour could somehow be wrapped around port 21.
Is there some magical way of port forwarding 21 to a router, like an Apple airport router to trigger the bonjour for the purpose of waking up a machine? In this case a server?
Wishful thinking I guess.
I contacted Ben at CrushFTP to learn more, perhaps he has a trick or two. Who knows.
Possible you could configure your routers port forwarding to have 21 go to 21 and 22. The data. On port 22 could cause the wakeonlan. But if you have ssh enable not sure what it would make of the data. Might cause real issues,. Is there no way for you to just do ssh user@machine date or similar to do the wake?
Hello Stephen and Dave
Thank you both for volunteering your time and thoughts on this challenge. I do appreciate it very much.
I took a moment to contact Ben of CrushFTP fame, he is the owner and main developer and I have to say, it is by far one of the most extraordinary pieces of software I have ever purchased. In any event, I raised the question of wake on wan and bonjour and if there are any possibilites or workarounds. Here is what he had to say.
No....and a server should never be asleep. Is minimal on the CPU usage of an idle machine, and the actual electrical costs, etc.
WOLAN shouldn't be used for a server that should always be available. Otherwise use some other tool to wake up the machine, then you can connect to it, etc. No bonjour support anymore as Apple made it difficult to keep it. We used to have it in CrushFTP 5/6, but not since then.
I want to thank everyone who read this and participated, I am going to close the curtain on this and just leave the server running as recommended. It's a very challenging effort and I know that ssh can play a role but I'll just let the machine run 24/7.
Thanks to all