0

Lets say that someone on the internet wants to send me a message (not a response) and my phone has a private IP address (and my router has a public IP address). Since my router shares its public IP with multiple devices, how would someone on the internet specify my specific device as the IP packet destination. Is NAT only capable of handling responses or can it handle messages too? (By messages, I mean packets that aren't responses to a request)

4
  • It doesn't. If you are behind an Enterprise layer NAT then you have a private IP address associated with your device and our ISP determines the networking route.
    – Ramhound
    Commented Feb 19, 2021 at 1:56
  • 2
    "By messages, I mean packets that aren't responses to a request" -- The adjective (for "message") that you're looking for is unsolicited.
    – sawdust
    Commented Feb 19, 2021 at 1:59
  • What (I believe) you are referring to is considered slipstreaming. It is not supposed to be possible in theory—but where there is a will there is a way. Of note: github.com/samyk/slipstream
    – JG7
    Commented Feb 19, 2021 at 2:58
  • For how NAT works, please refer to this article's example: How NAT works
    – Sunny
    Commented Feb 19, 2021 at 8:21

1 Answer 1

2

The NAT doesn't handle them. There is no way for someone outside to choose which device they want to reach; they only can reach the router itself (because it has the public address) and that's really it.

That's why you usually have to add "port forwarding" rules on your router – you have to tell it how you want it to rewrite the incoming packets. Port forwarding rules are literally just static DNAT rules.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .