how to ping a computer from wan

14,332

As your network is behind NAT, you won't be able to use a standard PING to each device. The ping utility sends ICMP requests, which will be responded to by a single device when sent to a WAN IP address, usually your NAT gateway (in this case your WiFi router I believe).

This is the intended behaviour, and is one of the fundamental security aspects of NAT, that your local devices are not revealed to a WAN.

How do I find the computers connected to the wifi network by using only the WAN IP?

There are a few options (and I'm sure many more than I will be offering here). To access devices behind a NAT, you can set up servers using specific ports. For example, when you have used telnet from outside of your network, it will be using the default port 23, which, as you've found, your device handling your WAN is listening to and allows communication.

It depends from here what your actual requirement is. If you wish to find out which devices are online, you could set up a server on each, which you could then 'ping' on it's specific port. Your NAT gateway can then port forward each request to the correct LAN device.

Or, you could set up a single server which you could connect into, via something like SSH, which would give you a device inside your network you could then ping each device from using it's local IP address.

The standard PING utility, as it uses ICMP which doesn't have a concept of ports, can't be directed to different machines behind your NAT gateway. You would need to use software that replicated the functionality of PING, but through a protocol like TCP. You'd then use this software in a format such as:

pingport WANIP:1234 for one machine

pingport WANIP:1235 for your next machine

...etc

I would suggest doing some further reading on the following:

NAT - en.wikipedia or simple.wikipedia

Ping from outside a local network

TCP/IP

Share:
14,332

Related videos on Youtube

heailraiser
Author by

heailraiser

Updated on September 18, 2022

Comments

  • heailraiser
    heailraiser over 1 year

    I want to ping computers connected to a wifi router, 192.168.0.x

    the wifi router is connected to a LAN cable router, 192.168.1.x

    i can access the LAN cable router through a wan network, 10.x.x.x

    i tried telnet to access the LAN router through the wan IP, i got the following connected device:192.168.1.2 <-- this is the wifi router

    then i tried to ping 192.168.0.1 <--- i think this should be the wifi router's ip address.

    My Question: How do I find the computers connected to the wifi network by using only the WAN IP?