Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Wake-On-Lan of known servers when regular access is attempt.
« previous
next »
Print
Pages: [
1
]
Author
Topic: Wake-On-Lan of known servers when regular access is attempt. (Read 1357 times)
philfine
Newbie
Posts: 2
Karma: 0
Wake-On-Lan of known servers when regular access is attempt.
«
on:
July 30, 2020, 12:02:55 am »
Hello everyone,
Although I have a PhD in computer sciences, I am in no way an expert in networking, so please apologize any stupid questions/suggestions. ;-)
I have a small homelab which most of the time is not really doing anything except idling.
More recently I was considering to suspend those machines when no network traffic would be requested, however just to come to the conclusion that WOL is much less "intelligent" then I initially expected.
My question to you are:
- Wouldn't it be possible to automatically trigger a WOL when some attempt to a particular machine happens ?
- Is it currently possible in OPNsense ?
- I was thinking of some Firewall rule which the outcome would be to trigger a WOL in the middle. Something like that. :-)
Thanks in advance for all your replies.
Regards
Logged
fabian
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: Wake-On-Lan of known servers when regular access is attempt.
«
Reply #1 on:
July 30, 2020, 11:56:43 am »
You might know that the kernel does not know anything about the user space until it gets a request from it, which processes are running and which resources are open.
The firewall (pf) runs in the kernel and does not know anything about wake on Lan or how that feature would work. The wol utility does not know anything about the current network traffic, so without some glue code, this is not possible.
What you need is some daemon, which is monitoring the traffic and if it sees that the host cannot be resolved, it needs to call the wol utility. The easier way is using a reverse proxy that implements this than integrate that into the network filter.
Logged
philfine
Newbie
Posts: 2
Karma: 0
Re: Wake-On-Lan of known servers when regular access is attempt.
«
Reply #2 on:
July 30, 2020, 05:48:37 pm »
Hi fabian,
Thanks for the insight on how this could be done, that clearly makes sense and IMHO an excellent feature to be added in.
I am "no dumb" programmer and would really love to contribute with such a feature in opnsense.
Creating a daemon or even performing wol I should not be difficult.
My problem is that I would have no clue how to monitor traffic, within the daemon.
Will you be able to help, pointing out to documentation to libraries, etc. ?
Thanks
Logged
fabian
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: Wake-On-Lan of known servers when regular access is attempt.
«
Reply #3 on:
July 30, 2020, 11:37:54 pm »
You need a binding for packet capturing like packetfu or raw tcpdump.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Wake-On-Lan of known servers when regular access is attempt.