Issues with incoming magic packet from LAN

Started by jpfeifer14, May 05, 2023, 10:07:26 AM

Previous topic - Next topic
Im pretty new to opnsense and Im trying to set up teamviewer to WoL. Ive had this working in the past when I was on a tplink router, but now im running into some issues. I was able to test the magic packet and see that the PC is receiving it on LAN to LAN connections, but even with a port forwarding rule in opnsense, the packet never makes it to the PC. Is there something else that must be enabled or allowed in the firewall?

My guess is that the magic packet is failing to be forwarded to a specific IP address because an offline system doesn't have its IP stack running, meaning it can't respond to ARP requests. You typically get around this issue by sending the packet to the broadcast address (192.168.1.255) instead of the actual IP. That should blast the packet to all systems, but because the magic packet contains a target mac address, will only wake the desired system.

That is how it should work, however I am running into a similar issue where OPNsense doesn't seem to honor broadcast addresses as expected. In my case, I am not using NAT, but the idea is the same. I'm curious if port forwarding to the broadcast address works, please let me know.

I will try that and let you know, but I will add that this was previously working with no changes to the offline system on a TP-link router. I don't really know if that gives and extra insight, as I am just learning all of this, but the setup has always had software and NIC WoL turned on, and was previously working with just a port forward rule in the old system. Currently I can use wake-on-lan monitor on the system while it is online and see that local magic packets from another machine on the same network make it to the machine, they just never make it through externally.

Interesting thing is, I dont even see an entry for inbound WAN traffic on that port, or any port I set for WoL. I know inbound on that ip (or url) works because other traffic comes through, but there is never a log entry when the magic packet is sent.

It appears to have been fixed. I think there was a static IP but not Static ARP

May 08, 2023, 04:20:02 PM #5 Last Edit: May 08, 2023, 04:23:43 PM by sphbecker
Keep in mind that "Magic Packet" can be sent directly as a layer-2 frame which cannot be routed, or a UDP:9 (or sometimes 7) packet which can.

It is important to understand how the magic packet is being sent. Most apps I have seen use UDP, but to be sure, start WireShart on the same subnet and filter for "WOL." Send the packet locally on that same network and see what shows up. If the destination is an IP address, then it is using UDP, if the destination is a mac-address, then it is not, and you would need to find another way to send the packet in order for it to be routable.