Wake on lan over WAN
I am new to FOG and first I want to say thank you for all this good work.
I need to wake up hosts over the internet which are behind a router. The router is set with static mac for every needed host.
The only reference I found for something like this is in the wiki: https://wiki.fogproject.org/wiki/index.php/WOL_Forwarding#WoL_Forwarding
I also found that the hosts table has a hostIP field but this field is not present anywhere on the management interface, or I can not see it.
How can I ease the wake on lan for hosts behind different IPs to use with FOG scheduled tasks?
I finally solved this using the WOL broadcast plugin. Steps:
- Created WOL broadcast with the public ip of the site where those computers are
- On the router from the second site added static arp for private ip 10.148.17.254 to mac ff:ff:ff:ff:ff:ff (broadcast)
- On the same router forwarded port 9 udp to 10.148.17.254
You can mark this as solved. Thank you!
For others: The remote site has computers with activated and working wake on lan and the router configured for DHCP with next server the IP of the FOG server and filename undionly.kpxe (for legacy BIOS boot).
@gn_ro See if WOL broadcast plugin is working for you. Can’t be sure as we don’t know enough of how your setup looks like exactly.
@Sebastian-Roth Thanks for answering. I have read all the posts, but it is still not clear what we have to do.
We have a location with only 2 computers behind a nat router. The computers are network booting from public ip of the FOG server. The setup works manually so we can wake on lan the computers using the mac and port forward but we need to automate this task when scheduling from FOG, so FOG wakes up the computers.
As a workaround I will set up a cron job to wake the computers before the task in FOG, but it was trying to find something built in FOG or there is a plugin to do this.
Maybe adding the pair IP + port to the host then edit wakeonlan.class.php to use that if it is defined, but I am bad at php…
@gn_ro There is a lot more to the topic of WOL over internet. It’s not something a central FOG master server can do for you just by itself. You will either look into a fairly complex manual setup of static ARP entries, port forwards and so on or setting up a FOG storage node in each distinct location and WOL broadcast plugin configured on the FOG master node.
See more on this here: https://forums.fogproject.org/topic/6913/does-the-locations-plugin-also-handle-wake-on-lan