And lastly the Wan with its default configuration.
I want to be able to Send a WOL packet though the Wlan network to wake up my PC that is inside Server network.
In Firewall>rules>Wlan I made a new rule like this: Action=Pass Interface=Wlan Direction=in TCP/IP=ipv4 Protocol=UDP Source=any Destination=Server address Destination port range=from 7 to 7
When i try sending a wol signal when my pc went to sleep a few minutes later i think the firewall rule goes though, but when i try to send from another device after lots of time later it doesn't go though i think.
Im using Moonlight to send its signal, does anyone have been thought this problem. Thank you
WoL packets are usually sent to the ip broadcast address for the network as they’re not ip based. I don’t know if this would ever work well across networks. Can you do send the wol packet from the opnsense router instead? Does it work then?
If you’re sending it to the IP of the server, it likely works soon after your turn the machine off because the ARP entry hasn’t timed out yet, but once it times out it won’t work anymore. The router doesn’t know how to get to the machine. You may be able to add a static arp mapping to get it to work long term.
Update:
I have installed the wol plugin from opnsense into my machine, you asked if i can send a wol packet though the router and so in my thinking i was able to do it via the plugin.
The problem starts on the ARP, i found what it is and what it do but i dont know how i can insert the MAC address into the firewall rule that i created above, if you dont mind could you help me on how can i do it? And if i do that will i be able to send the wol signal though the Wlan or Wireguard in the future? Thanks
There is a trick you could do to send a WoL packet to a separate IP on the sender network and modify it so it is repreated on the network of the machine you want to wake up.
I can't find docs on thisb on mobile, but can look for it later.
It can't work like a typical IP packet routing tho. I've only made it work with a VPN connection.
Another thing you can do is ssh to your router and send a WoL packet from there on the machine's LAN.
If you can share that trick it would be great!!. Preferably i would like to use the Moonlight client wol signal but if can't, i can think of doing a script in the termux android app to send the packet
This is for edgerouter, which is what I use, but I suppose opensense can do this just as well.
Keep in mind, don't use 1.1.1.1 for your forwarding address, use one in your LAN range, just outside of DHCP because this type of static routing will mess up a connection to anything actually on this IP.
10.0.40.114 is the address I use to forward WoL broadcast to.
Then I use an app called Wake On Lan on Android and set it up like this:
Hostname/IP/Broadcast address: 10.0.40.114
Device IP: [actual IP I want to wake up on the same VLAN/physical network]
WOL Port: 9
This works fine if you're using the router as the gateway for both VPN and LAN, but it will get messy with masquarade and NAT - then you have to use port forwarding I guess, and it should work from WAN.
I just wanted it to be over VPN to limit my exposure (even if WoL packets aren't especially scary).