how do websites know my IP?(not a totally noob question)
-
each side can see the other side's IP in the packet header but if we run for example tracert codeproject.com we see that a packet goes through a number of gateways between the client and the server .Isn't it supossed that each gateway changes the last gateway's IP address with its own so it can get the packet back ? if it is so then how codeproject see my IP and not the IP of the last place the packet went through ? thanks
-
each side can see the other side's IP in the packet header but if we run for example tracert codeproject.com we see that a packet goes through a number of gateways between the client and the server .Isn't it supossed that each gateway changes the last gateway's IP address with its own so it can get the packet back ? if it is so then how codeproject see my IP and not the IP of the last place the packet went through ? thanks
In any TCP/IP connection, the client's originating IP address is known to the server so they can return a response. You can spoof your IP but you won't receive any data back. The originating IP can often be the outside router IP. The trace you did merely shows the various hosts in the route from client to server. The originating IP is still transferred for the reason mentioned above. Hope this helps.
Regards, Nish
Website: www.voidnish.com Blog: voidnish.wordpress.com
-
each side can see the other side's IP in the packet header but if we run for example tracert codeproject.com we see that a packet goes through a number of gateways between the client and the server .Isn't it supossed that each gateway changes the last gateway's IP address with its own so it can get the packet back ? if it is so then how codeproject see my IP and not the IP of the last place the packet went through ? thanks
An excellent example of layered protocols. IP, the lower layer, handles the node-to-node messages, as your
tracert
shows. But a couple of levels higher, the http headers convey the endpoint IP addresses required for end-to-end intelligence. Something like Wireshark will pull the packets apart for you, if you're interested. Cheers, PeterSoftware rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
An excellent example of layered protocols. IP, the lower layer, handles the node-to-node messages, as your
tracert
shows. But a couple of levels higher, the http headers convey the endpoint IP addresses required for end-to-end intelligence. Something like Wireshark will pull the packets apart for you, if you're interested. Cheers, PeterSoftware rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
Peter_in_2780 wrote:
http headers convey the endpoint IP addresses required for end-to-end intelligence.
Intelligence? http is usually layered on top of tcp, which is the part that is handling all the intelligent stuff. Http on the other hand used to be really, really simple[^], but that's changing[^] ... Both the source and destination addresses are part of the tcp checksum header[^] ... Cheers :-) Espen Harlinn
Espen Harlinn Chief Architect - Powel AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra
-
each side can see the other side's IP in the packet header but if we run for example tracert codeproject.com we see that a packet goes through a number of gateways between the client and the server .Isn't it supossed that each gateway changes the last gateway's IP address with its own so it can get the packet back ? if it is so then how codeproject see my IP and not the IP of the last place the packet went through ? thanks
If they don't know your IP address, they can't reply by sending pages to you, and you've broken the Internet. You really shouldn't do that. Mummy will be annoyed.
I wanna be a eunuchs developer! Pass me a bread knife!
-
In any TCP/IP connection, the client's originating IP address is known to the server so they can return a response. You can spoof your IP but you won't receive any data back. The originating IP can often be the outside router IP. The trace you did merely shows the various hosts in the route from client to server. The originating IP is still transferred for the reason mentioned above. Hope this helps.
Regards, Nish
Website: www.voidnish.com Blog: voidnish.wordpress.com
It's like a Postal Letter right Nish? The "From" and "To" is always there on the covers, unchanged. No matter how many intermediate stops it goes through. :)
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
-
Peter_in_2780 wrote:
http headers convey the endpoint IP addresses required for end-to-end intelligence.
Intelligence? http is usually layered on top of tcp, which is the part that is handling all the intelligent stuff. Http on the other hand used to be really, really simple[^], but that's changing[^] ... Both the source and destination addresses are part of the tcp checksum header[^] ... Cheers :-) Espen Harlinn
Espen Harlinn Chief Architect - Powel AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra
-
Http is almost an "application" of network protocols beneath. :)
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
True enough ;-)
Espen Harlinn Chief Architect - Powel AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra