Wake on lan not working with a wan configuration?

Hello i have this configuration routers: fiber connection----fritzboxrouter-----redmirouter----PC actually dhcp in on in the two routers, different ips, and connection from fritz to redmi is wan the problem is that wake on lan is not working with this configuration, wake on lan only work when i remove dhcp from redmi router and setting on it a ip address of the same family of fritz router is possible solve this problem with the wan connection?

I never tried this with OpenWrt, but I have some pointers for you.

The problem is that the wake on lan 'protocol' is not IP, but ethernet. The NIC acts on any packet arriving, which payload contains 6 bytes 0xFF followed by 16 instances of the NIC's MAC address. That's it. When you magic packet generator uses pure ethernet, there is no way to get is though a router, as it doesn't route ethernet.
Some magic packet generators encapsulate the magic packet in an UDP packet, by default send to the broadcast address port 7 or 9, but sometimes you can specify it. If you specify the wan address of the redmirouter, theoretically you setup a port forward for UDP 7 and/or 9. Problem is that your PC is off, and so it has no IP address, and so you can't forward to the PC. A work-around could be to add the PC MAC/IP as static ARP entry. Another one could be if you can forward it to the broadcast address of your LAN.

Can you explain me how do that workaround please? The more simple way

You know how to setup a portforward? This is the same, except that you have to forward to the broadcast address. eg 192.168.1.255, if that is your subnet.
No idea if Luci accepts this.

Portforward on the fritz router? No i dont know how
My fritz is on 192.168.178.1 and redmi is on 192.168.31.1
What is luci?

In data 16 marzo 2022 16:50:56 Anonymous via OpenWrt Forum mail@forum.openwrt.org ha scritto:

Luci is the webinterface of OpenWrt. To portforward, you have to go to Network->Firewall->Port Forward.

on fritzbox settings? and what port forward i must open? please explain me, i'm a noob :slight_smile:
i need this for use wake on lan alexa skill

No, on the redmirouter. Forward port 7 and 9 UDP.

dmz can be a solution?

the second screen is the port forwarding, what i must set in porte esterne, ip interno and porta interna?
thanks

porte esterne and porta interna should be 7 or 9, depending on you magic packet generator, and ip interno should be 192.168.31.255.

BTW, that doesn't look like OpenWrt to me.

in fact these are the redmi settings, i'm not using openwrt
on ip interno it say that max number is 254

You listed 2 devices in your OP -- which one of them runs OpenWrt? Where is the wake on lan being triggered from?

I dont use openwrt, i want use wake on lan skill from alexa

In data 18 marzo 2022 23:09:05 Peter Sherman via OpenWrt Forum mail@forum.openwrt.org ha scritto:

This forum is focused on OpenWrt. This is not a general networking forum or one for Alexa skills.

Please ask your question in a place where you can get the correct audience -- a forum for Alexa would be a good place to start.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.