That may be a dumb question but I am a student in computer science(security & networking) and I gotta find someone who can clearly explain this concept to me.

If the server of an app. 'x' is used as a point of transition between networks, how do hackers are able to get the wan address of a sender of a packet 'x'.

Thanks for your answers!


your computer send the packet to your router, which gonna change the destination ip for the server of the app

Layer 3 information (source IP & destination IP) are end-to-end and do not change throughout the routing process. However, layer 2 information (source MAC address & destination MAC address) DO change during the process as they are on a hop-to-hop basis.


For example, say my computer on (gateway of with the MAC address of 000a:111b:222c wants to talk to My computer will automatically detect this destination IP is not within my subnet and will ARP for its default gateway on (presuming first communication). Default gateway will respond with its MAC address (111a:222b:333c) and my computer will store this in its local ARP cache. Now, the packet destined for will be sent with the below information:

srcmac: 000a:111b:222c
dstmac: 111a:222b:333c

Once the router receives this, it will perform a routing lookup and replace the dstmac with the MAC address of its next hop.

This process is repeated till the packet reaches the destination network.

| improve this answer | |

Normally your computer sends the packet to your router, which gonna change the destination ip for the server of the app

This is incorrect. Neither routers nor switches change the IP addresses.

| improve this answer | |
  • I was talking about destination ip and source ip – Raynight Jun 10 '19 at 16:58
  • 1
    Yes those addresses do not change – Ron Trunk Jun 10 '19 at 17:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.