Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I think there are only two ways a application or a server could get your IP.
If it is an application, java/flash, I think it could check your network settings locally and send your IP back to the server. Then the server would know.
The other way it could find is that it could analyze the packet headers. Then find there your IP information.
But if I wanted it to stop doing it.
If it was analyzing locally my IP information I could stop that packet or change its information so the website would be confused about the IP information.
If it was analyzing the packet headers and if knew what packets it was analyzing because it wont analyze every packet, I could stop sending those packets.
Example:
Websites that checks your IP, how does it do it? If you are not downloading any application, you would exclude the 1. scenarion. Then the only possibility is that it was analyzing packet headers but what kind of packets?
It was not one question only but if anyone knows something about it, I would like to know too. :)
Thanks
You can't prevent a website to know your IP. If you do prevent it, it would be unable to answer your request. If you are really interested in anonymity have a look at proxy servers, especially at high anonymity proxies.
As soon as you establish a connection to a remote host, your IP address is revealed. You can not simply say, "I'd like to connect, and by the way, my IP address is 123.123.123.123".
The webserver will tell what ever script it executes, from which IP address the connection was established (and request made).
Your IP address is in every TCP segment. The remote web-server (to which your web browser makes the connection) will make this information available to the hosted site.
To send a different IP address, you have a couple of options. You could use a proxy server and have its IP address transmitted. Alternatively, you could use IP Spoofing, if you don't want to receive any information back!
You can't prevent a website from knowing the IP, that sent the request. At best you can route it through a proxy, so the website resolves the IP of the proxy server.
You should read up on TCP/IP. In short, TCP/IP packet contains the originating IP address, because it must conform to the IP protocol and send a valid IP header.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
If I have a server that is allocated a static IP, and that server sits behind a NAT controlled router will my server always be able to send a response directly back to the IP & Port of the sending client?
My server may be a game server or some other type of UDP based service, but it will always be inside a NAT controlled network, and reciving UDP packets from externally connected clients.
if server responds to that IP and port client will always receive response back ?
Yes - the router(s) in charge of the NAT will maintain state such that returned traffic is translated back to the correct, original client. This is true of any layer 3 traffic (protocol and port doesn't matter).
Consider the following:
Client IP Client public IP Server public IP
192.168.10.151 <-router-> 86.45.75.12 <-internet-> 125.12.67.35
Corresponding traffic flow:
1) Client request traffic:
---------------------------------------------------> arrives with source of 86.45.75.12
2) Server response traffic sent back to 86.45.75.12:
<--------------------------
3) Translated back to 192.168.10.151:
<-----------------------------------
The server will see traffic with a source of 86.45.75.12, and will send response traffic back to that IP. The router handling the NATing for the client will maintain state such that it knows response traffic coming from 125.12.67.35, going back to 86.45.75.12, will be correctly translated and routed to the original source, 192.168.10.151.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I've got a Draytek Vigor 2820 that's used to connect to the internet. WAN1 is used as an ADSL backup, and WAN2 is our main fibre connection. WAN2 has a total of 6 IP addresses, a single dynamic one and 5 static IPs and is configured up as a PPPoE connection with DynamicIP.
I use NAT Port Redirection to open up some specific ports to various servers (web development, FTP, RDC etc)
I use NAT Open Ports to open up some static IP ports to specific servers
I use NAT Address Mapping to force all traffic received on one static IP to our Exchange server
What I want to do is to force outgoing traffic to use one of the static IPs and have hit a brick wall. Ideally I'd like to force specific traffic but would settle for all!
Under LAN is the ability to configure Static Routes, but this is purely there to allow internal routing (for VLANs).
Anybody else who has this type of router and can give me any suggestions?
OK, managed to work this one out.
Under WAN > Internet Access, select WAN2
On the PPPoE page, change the "Fixed IP" to Yes and enter one of the static IP's into the Fixed IP Address box. Click OK and then reboot the router.
All traffic will now go from that IP address. If you go back to the same page and click WAN IP Alias, the top spot will have the IP address entered in it which will likely be repeated in the list, I just removed the 'double' from the NAT pool and everything seems to work OK.
Sadly there appears to be no way of having all traffic to one IP being sent via one static IP
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
The community reviewed whether to reopen this question last month and left it closed:
Original close reason(s) were not resolved
Improve this question
Let's use a browser as an example. HTTP requests do not need to contain any IP addresses. So would www.example.com be translated into an IP address at the TPC layer?
EDIT
Seems like DNS is used to tell TCP which IP address to connect to. So does HTTP call DNS?
With this stack:
HTTP
DNS
TCP
DNS is a protocol that arguably sits at the application-level, but is a separate application in and of itself that makes use of the whole TCP/IP "stack". (LDAP is similar, if that helps "place" DNS.) It's a fundamental "phone book"-like directory for the Internet and has absolutely nothing specific to do with the HTTP protocol. DNS uses UDP and TCP transport to query other distributed DNS servers to answer client questions like "what IP addresses are associated with the name www.google.com?". Once a client application, like a web browser, has an IP address with which to connect, DNS is then out of the picture. The browser opens up a TCP connection to the IP address and then initiates the HTTP protocol over that TCP transport session to talk web stuff.
In OSI stack terms, DNS runs in parallel to HTTP in the Application Layer (layer 7).
DNS is in effect an application that is invoked to help out the HTTP application, and therefore does not sit "below" HTTP in the OSI stack.
DNS itself also makes use of UDP and more rarely TCP, both of which in turn use IP.
Application Layer - #7 of OSI
http://en.wikipedia.org/wiki/List_of_network_protocols_(OSI_model)
In response to your latest edit:
Doesn't DNS use UDP to send a response indicating any details of the requested IP (unless a certain size threshold is crossed 512bytes).
Well technically the client computer is the first to be "asked" which IP address should link to which domain name.
Which involves the term DNS resolver. Essentially it searches through previous queries which are cached on a clients computer and if it finds a match then it returns what would essentially be a normal DNS lookup (without leaving your local network to find an answer/address). You can actually edit this file on your own computer and the URL of your web browsers will actually show your changes.
I'd advise you to download and install wireshark. Run wireshark and visit some websites. You can see how DNS works. DNS (as already mentioned) is handled at the application layer. Almost all high level languages have libraries for the function 'gethostbyname'.
Python 3.3.3 (default, Nov 26 2013, 13:33:18)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostbyname("stackoverflow.com")
'198.252.206.16'
Take a browser for example, after acquiring the host from the DNS server using some form of gethostbyname, a standard TCP socket connection is established and the browser/webserver communicate over HTTP.
Regarding the OSI it is the Application layer - layer 7
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
The ping utility works above the network layer and DNS works in the application layer.
If we try ping www.google.com, how does it resolve the IP address of GOOGLE since the DNS is above these layers?
ICMP (the protocol) may operate above IP, alongside TCP but a ping program itself almost certainly still uses the normal methods for name resolution, be that DNS, hosts file or resolv.conf.
For example, the ping program located here calls on gethostbyname() to turn DNS names into IP addresses.
Certainly on windows computers, ping also uses LLMNR (Link-Local Multicast Name Resolution) to perform hostname resolution.
A host may be pinged just fine while other services still fail if a computer is only known by LLMNR and the failing service relies on DNS.
Vice versa: DNS may work but ping fails
Hostnames are still resolved through DNS, after that ping uses ICMP for the actual communication. You can try changing the DNS configs to invalid servers and see that ping won't work with hostnames.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
When I visited the website http://myipaddress.com/what-is-my-ip-address/
I checked the request header information. No where does it include my ip address. So how is the web server able to determine my ip address? I know that any web server has access to this information. But if its not there in the HTTP request, how do they get it?
You're connecting to the server and sending it an HTTP request. The server replies with a page. To do that, it has to know where to send the reply to. That information is automatically available from the socket connection (i.e. from a lower level than HTTP), so it doesn't have to be repeated in the request headers.
Edit:
If you want to know more about how the web server does this, see the accept function. When a connection comes in, the web server calls accept, which automatically provides it with the address of the other side.
It's in the incoming TCP/IP packet to the web server. HTTP packets are encapsulated within TCP/IP packets when sent across the Internet (which, as strange as it may seem, are also themselves encapsulated by a variety of protocols in transit).
The incoming TCP/IP packet will contain a bit of information about the source including the source IP address as well as the source port number.