Wake on Lan with OpenWrt

But I have install openwrt in router 2 only.
Then in putty, I put ip static or 192.168.4.1, (this is router2 subred )
Pc is off

You didn't explain all these from the beginning in one post. One cannot easily help you if you don't give the full picture right from the start.
You can still access the 2nd router over SSH, just forward one port on router1 to router2 and SSH from your laptop to that port on router1 internet address.

1 Like

But in the router/módem 1 have not installed open-wrt, it is router of company. How can I comunicate the routers? What port should I open and what protocol should I used? Is there any tutorial in Internet ?

Thank

I would google the model of the router1 and port forward.
You'll need tcp protocol and port 22 as destination.

On router 1 you need to port forward TCP port 22 to router 2

On router 2 you need to accept connections on TCP port 22 from WAN

On router 2 you need to configure dropbear to accept login from WAN Interface.

https://www.google.com/url?sa=t&source=web&rct=j&url=%23&ved=0ahUKEwir-tHMm-HgAhVjrHEKHXYZAwUQxa8BCCcwAQ&usg=AOvVaw0VTJzWxrN8ZFOD4xbU2nov

Is this a generic example?

Can you see it?

Link does not open.
Go here
Find your router and configure the port forward.

Ok, I will try on the weekend and I will tell you.
For connect with putty, I put ip subred router 1, but I dont have make a túnnel, because I am goimg to try connect from other pc y other internet connectión. I dont undertand well putty

You will need to forward that particular port on router 1 to router 2 IP

And then when you try to login, you actually put the IP of router 1, and it will forward the message to router 2.

@mbo2o already explained that.

1 Like

Ok, thank.
Could you pass link where @mbo2o explain that with putty, please

Thank

In PuTTy, you only need to put the external IP of your main router and the port. That's as far as PuTTy is concerned.

As for forwarding that port from your main router to OpenWrt, this will have to be done on your main router, and the procedure is router-dependent. You will have to refer to the manual or ask your ISP tech support.

But I dont understand, if I am online with a portable pc from other place in my country and I want connect with putty to the router2, Just writing subred router , for example, 192.168.1.1 and port 20 connect?? It is impossible, putty need more informátion for connect router 2 and entry in Lucy.
could you explain the steps, what ip do I have to put??

Thank

You need to know your public IP

For that you can use http://icanhazip.com/ (thanks @dlakelan )
Or check your router 1 status.

It needs to be static.
If it is dynamic then you need to use a dynamic DNS service, again for dynamic DNS check router 1 settings and read the manual.

http://icanhazip.com/

Is a tracking free very simple IP address reflector.

1 Like

Ok , I need put static públic ip , and this ip entry in putty.
Thank you very much for your patience, I feel a little clumsy. I think I understood everything. I try it these days and I tell you.

thank a lot

You will need to check with your ISP if your public IP is static ( you can't make it static yourself ).

Ah ok, I have put my private ip estatic, not my públic ip. Ok I understand

From INSIDE your LAN open the following page and you'll see your public ip.
https://www.icanhazip.com/

Hello,

Thank at all¡¡¡ I have alredy accessed in router 2 for ssh from other wan. ¿what command do I need for make wake on lan in LEDE?

Thank

You have to install etherwake package:
https://openwrt.org/packages/pkgdata/etherwake

Then use command to wake your device:
/usr/bin/etherwake -D -i "br-lan" -b "XX:XX:XX:XX:XX:XX"

"XX:XX:XX:XX:XX:XX" stands for mac address of your device

1 Like