Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does a server get your IP? 1

Status
Not open for further replies.

Supra

Programmer
Dec 6, 2000
422
US
It may seem simple, but I'd like to know how a server gets your IP address. Is the web browser responsible for getting the IP address and reporting it in the header, or does the server trace the IP address somehow? Any insight you might have would be very much appreciated.
 
on the internet "getting" ip addresses is done more by routers in the first instance.

So say you are downloading a file from via http (port 80)

When you type that address in, DNS converts the domain name to an IP address via means of a DNS lookup. Often this will be the address of the networks router (or indeed one of the routers) - the packet goes along its way and arrives at the router.

So within the router there may be firewall rules set up to deal with cetain requests on specific ports. So if you are contacting a web server for example, the destination IP address would be appended with the destination port of 80, eg. 162.85.33.177:80 - and would be forwarded via a firewall rule to the server designated to deal with these requests, ie, a web server....the router keeps track of these different 'conversations' by way of source port numbers which allow the router to differentiate between one data request and another...

Once past the router, the internal network may well be a private addressing scheme, again the port numbers come in to play here, as the server may respond to a request from, and return data to the ROUTER, which then 'translates' this destination back into the public address which originally requested the data, because it has the source port and therefore knows where it is going.

and hey presto, the router has your IP address and can send data back.



'When all else fails.......read the manual'
 
FYI I should have mentioned, the 'translation' process i mentioned is called NAT - Network Address Translation - and is used for saving public IP address space and as a security measure - entire organisations with thousands of hosts can have just one, or a few, public IP addresses.

By security, for example, I mean that a server does not have to sit directly on the internet, it can sit behind a router/firewall which will only allow access to specific areas of the server.

Hope this is useful...hope i havn't told you stuff you already know!

'When all else fails.......read the manual'
 
That was definitely helpful and I've given you a star for the invaluable information. However, I have more questions :) I recently stumbled upon Microsoft's Virtual Earth - a Google Maps clone - and was shocked to find that my IP address pinpointed my longitude and latitude. I've tried free services like GeoBytes before, but the results were anywhere from 1-5 miles off. Microsoft pinpointed my house almost exactly. To see for yourself, please go here:


It should give you your longitude and latitude, which you may paste into Google Maps, delimited by a comma. Alternatively, to see Virtual Earth's amazing Bird's Eye view, navigate to and type this in the address bar (my little workaround)..

javascript:map.PanToLatLong(<latitude>,<longitude>);

..and press enter or click Go.

Anyway, my question is, how is this possible? I suppose I understand that you can traceroute where the IP originates, but why is Microsoft deadly accurate as compared to the other services? It scares me :\
 
Thanks for the star :)

I will check that out and get back to you!

However, USUALLY when you do visual traces by IP address it shows the location of your ISP, not the location of your house. When you connect to your ISP, you are allocated an IP address from their net block..this gives you access to the internet but should not (and i have never seen!) give your actual, precise, location

If this were the case then it would save the feds having to go through often lenghty procedures to retrieve the actual location of an IP address from an ISP!

But as I say, I will check it out as I have not used this service...but sounds interesting!

'When all else fails.......read the manual'
 
It's only going to give the location of your ISP, or where ever/whoever your ip adress is registered to.

If you put your ip into and search it, you should find your isp's adress. I'd guess this is where its getting the information from

Stu
 
No, because like I said, it actually pinpointed my house. There must be some other way it checks access points or something, but it's deadly accurate. Try it!
 
I tried it, and it told me I was in Cambridge where my IP's are registered. (I live in london)
 
Well I guess it's hit or miss, but I just tried again and it is dead on. I wonder if it has anything to do with my wireless router..? There's an option to install a WiFi type thing that attempts to locate your house, but I declined that and just used the IP address. I dunno, but however it does it is awesome.
 
Don't they know your address already? If you logged on, then it'd be easy to pinpoint on a map.

-David
2006 Microsoft Valueable Professional (MVP)
2006 Dell Certified System Professional (CSP)
 
Nope. Microsoft doesn't have my address at all, and you don't logon to Live Local. Even if you had to, I wouldn't enter my real address.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top