Access LAN devices from WAN network through port forwarding

Hi,

I just bought a smart mini router GL-AR150-609. I’ve set it up as a repeater, wirelessly connected to my home router. I’ve also created static ip addresses for each of the devices that will be connected in the LAN. Now I want to be able to connect to my home network (not the gl-ar150 repeater router) and I want to open a port for each device in my LAN so that I can individually access each device from my home network. I’d like to be able to access each individual device via ssh, and I don’t want to set up through ddns. I’ve tried several different settings however, have not been able to set this up.

My repeater router ip address is 10.0.0.0
My device in the LAN is 10.0.0.185 (it’s a raspberry pi)
The gl-ar150-609 IP address from the router is 192.168.1.106

In the main gl inet homepage for the repeater router, I have enabled WAN Access to port 8008, then in the advanced settings under Network->Firewall->Port Forwards, I have added a new port forward with Protocol TCP+UDP, External Zone is WAN, External Port is 8008, Internal Port is 8008, Internal Zone is LAN, and Internal Port Address is 10.0.0.185 (my devices ip). After adding this and saving changes, I tried to ssh into the device:
ssh -p 8008 pi@InternetIp

Where InternetIp is my internet’s IP address.

This did not work. Maybe I’m not using the right ssh command or ip address. I also tried opening port 22 on the router by adding port 22 to the “Open ports on router”. This also did not help.

Is there something I’m missing? Can you help in directing me how to ssh into a device on the LAN network from my WAN network having a repeater router set up.

Thanks
Rachel

Is the Pi using wireless? If not you probably want a bridge (turn wireless into wired) and not a repeater (halve speed and amplify signal).

That WAN access port is for the admin GUI. Don’t enable that and port forward to the same port but a different device. Otherwise you have two devices listening on the same port.

Why do you have the GL on a different subnet but devices connected to it on the main subnet? You might consider flattening that. It’s also unclear where you are trying to SSH from. Are you on the network or are you external to it? It sounds like you’re double NATing. Further, 10.0.0.0 is an odd address for most home networks. How big is your subnet?

You need a port forward of, say port 2222 on wan, to port 22 on lan.
Then from a connection on wan, the command would be:
ssh -p2222 pi@internetip

Thank you! That’s fixed the problem…I set the internal port to 22 for ssh, and this worked as expected. Thanks for the help :slight_smile:

1 Like