0

I have 2 iPads and a MacBook behind a router. If I check my Public IP address for those devices, they all have the same IP, which I assume is the IP of my router.

Anyway, if I were to port scan that address, wouldn't it only be port scanning the router itself and not the devices? When running a port scan how would I specify the device?

david
  • 109
  • 1
  • 1
  • What do you mean by behind a router? Connected to it? – Tim G. Sep 17 '16 at 20:20
  • It completely depends on the configuration of your router, which we have no way to know. You're getting answers that make assumptions about the firewalling capabilities of your router, which we have no way to know. – David Schwartz Sep 17 '16 at 20:51

2 Answers2

5

You could scan the ports of individual devices from your LAN using their internal address.

You cannot scan the individual devices from the outside (assuming IPv4 and regular home router setup) as a consequence of the Network Address Translation that happens in the router. Essentially your whole home network looks like a single device from the outside.

Edit: see this for a short explanation: What is port forwarding and what is it used for?

0

If you scan the ports of your public IP address, you will see only the ports that you have deliberately opened to the public internet in the router configuration: these will be mapped (forwarded) individually to machines in your intranet, behind the router.

To find which machine handles which port, you will need to log into your router's web interface, provided you have enabled remote maintenance.

To find the open ports on your intranet which are not mapped to public ports (and I can't see a good reason for doing so from outside the intranet), you need to enable remote log-in on a machine in your intranet, so you can connect and scan from there.

AFH
  • 17,300
  • 3
  • 32
  • 48
  • How do you know his NAT isn't permissive? – David Schwartz Sep 17 '16 at 20:51
  • @DavidSchwartz - It seems obvious that router is a domestic one, which by default would operate as I described. From the the level of the question it seems unlikely that any advanced configuration has been enabled. I agree my answer is simplified, but I believe it provides a basic answer to the questions raised. – AFH Sep 18 '16 at 00:08
  • If the OP was concerned about security, which they may well be, assuming that their router is firewalling because many home routers do by default is really not a good idea. – David Schwartz Sep 18 '16 at 00:11