Find devices on external network through IP?

Nov 5, 2018
2
0
10
Hi,

I have a public IP address of my router and I am trying to connect to my raspberry pi that is on the network. However I cannot ssh to it unless I have the public IP of raspberry device, but at the moment I only have the public IP of the router saved

Is there any way to ping the router and obtain all IP addresses that sit on that network?

FYI; I am connecting from outside, i.e. away from my home

Thanks,
Joe
 
Solution
On your router you would forward 2222 to your PI IP address port 22. You would ssh using your public IP address with the port set to 2222 in your ssh client (Putty, etc).

kanewolf

Titan
Moderator
Unless you have an atypical home setup, your PI doesn't have a public IP address. It has a private IP address (192.168.x.y for example). You have to port forward, on your router, port 22 (ssh port) to your PI. Then when you ssh your public IP address (the WAN address of the router), it will send that traffic to the PI. That is a security vulnerability for your network. Because port 22 is a well known port, all the bots are probing for open port 22. You can mitigate that vulnerability some by using a different public port like 2222 or something. Forward 2222 to port 22 on the PI.
 
Nov 5, 2018
2
0
10


So from 192.168.0.1 I just do the port forwarding -> 2222 -> my local raspberry pi IP address? and then I just ssh using port 2222?


I have Virgin media 3.0 hub

Thanks