Wake on Lan with OpenWrt

Hello,

I have a router as bridge and I like make Wake On Lan.

Router 1----Principal Router (internet connection)
Router 2 (repeater) --- Router as bridge, this router connect by wifi wiht router 2, and PC connect router 2 with LAN.

When I connect LAN (PC-Router1) and swicht-off PC the yellow led blink and i can WOL, but I connect LAN (PC_router2) and PC swicht-off the led don´t light.

Could i WOL??

thank

Why don't you try it?
Install etherwake package with opkg (or from Luci-Software) and send the magic packet.
/usr/bin/etherwake -D -i "eth0" "00:14:15:DD:75:AA"
customize the interface and mac address to your needs.

I have win10

WoL is independent of OS.

How can I install the package? Could you help me? I dont know step to follow.

Thank

If you are connected with SSH you can run the commands
opkg update; opkg install etherwake
If you connect with your browser on the Luci web interface, navigate to System - Software, enter etherwake in Download and install package: field and hit ok. You can also install the Luci module called luci-app-wol for operating the WoL in Luci.

Ok , I have install yet. But, how can I configuraté for wake this pc with other pc?
I like make WOWan

Maybe I did not explain well. I like wake up PC1, PC1 is connected router2 with LAN. Router2 ,is a bridge, router2 is connected router1 by WiFI. Router1 is a principal router.
I like Wake on wan with other pc.

Thank

You can install etherwake on Router1 or Router2. Then send the magic frame to PC1.

But I want to wake from another Internet conection with a software magic-packet-gui for example.

Other solution that I think is remote connect to router2, entry in Luci and wake on lan. It is possible? Can you explain some procedure.

Thank

I think you mean from somewhere on the internet you want to connect to your router and wake a LAN computer. Easiest is to allow ssh from the WAN, and connect and run etherwake command from command line.

3 Likes

How I allow ssh from the wan?? I have the package wake on lan in mi lucí yet but I dont know connect router from internet with ssh. Could you explain me please?

Thank

From LuCI, go to system > administration, under "Dropbear Instance" select interface "unspecified", it will now listen on all interfaces including WAN.

save and apply settings.

Now under Network > Firewall > Traffic Rules

Under "Open ports on router" create a new rule with:
Name = "sshwan" protocol = TCP external port = 22

click add

in the list of rules, you will now see a rule allowing input from wan to port 22 (ssh)

save and apply settings

done

make sure you either use a cryptographically random generated password, or a public key to login.

2 Likes

Ok , now, how do I entry in this router from the other pc ,in other connection? I need some software as putty?

Yes
https://openwrt.org/docs/guide-quick-start/sshadministration

2 Likes

With this procedure can I access my router from any intermet connection? And wake on lan pc from lucy

ok, I'm going to try it right now and I'll tell you, thank you

Sorry, I've tried but it does not work, putty says "network error: connection time out"

I'm trying to connect to the router from a portable pc connected to another network.

remember that router 2 is like WISP

This is my configuration for make wol , photo

Do you have public routable IP address on the wan interface of the Openwrt router?
If yes, is it static or do you use some dynamic dns service?

I have static ip

So you only need to SSH to that IP from Putty or any other terminal emulator program.
Just make sure the port 22 on firewall is open for the WAN interface.

1 Like