I'm trying to route an UDP packet, from WAN port 9, to be broadcast over the whole LAN (same port).
In other terms, trying to wake-up my Linux workstation from Internet, using the famous UDP "magic packet" that embeds the MAC address of the PC to be woken-up.
Remote Server ➜ Internet ➜ LEDE ➜ LAN ➜ target PC
Remote server does wakeonlan -i LEDE-WAN-IP PC-MAC-ADDRESS
What about adding this to firewall
config 'redirect'
option 'name' 'wakeup'
option 'src' 'wan'
option 'proto' 'tcpudp'
option 'src_dport' '9'
option 'dest_ip' '10.1.1.10'
option 'dest_port' '9'
option 'target' 'DNAT'
option 'dest' 'lan'
and adding the IP 10.1.1.10 to ethers
along with the PC MAC address?
Would that work?
[ tbh tried with Chaos Calmer:
- the packet reaches the PC (tcpdump) when the PC is ON
- but when the PC is Off the packet doesn't reach the PC NIC, despite the
ethers
entry - ssh to openwrt,
arp
showed00:00:...:00
as MAC for that IP - Wake-up via magic packet works on PC when sent from another PC on the LAN (ie not via openwrt) ]
Thanks