Send WoL signal though Opnsense networks - eviltoast

So i dont know what im doing wrong. I have 3 interfaces on opnsense

1:Server=192.168.40.0 2:Wlan=192.168.20.0 3:wireguard=192.168.60.0

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

  • magikmw@lemm.ee
    link
    fedilink
    English
    arrow-up
    3
    ·
    7 months ago

    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.

    • coffelov@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 months ago

      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

      • magikmw@lemm.ee
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        7 months ago

        I think this lead me on the right path: https://community.ui.com/questions/Having-trouble-allowing-WOL-fowarding/5fa05081-125f-402b-a20c-ef1080e288d8#answer/5653fc4f-4d3a-4061-866c-f4c20f10d9b9

        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.

        This is how it looks in my edge os config:

        protocols {
          static {
            arp 10.0.40.114 {
              hwaddr ff:ff:ff:ff:ff:ff
            }
          }
        }
        

        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).