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.
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 2 years ago.
Improve this question
The website is reachable by host name but not by the ip adress specified in the A record. The DNS successfully resolves the request to the same ip specified in the A record.
Postman tells me: Error: Hostname/IP does not match certificate's altnames: IP: [...] is not in the cert's list.
Background: I have connected a Firebase application with a existing Domain. Firebase has generated a certificate for this website.
There are not enough IP addresses for all web sites to have a unique IP address. Firebase Hosting makes everyone's sites share the same IP address, and is able to distinguish requests for sites using the HTTP Host header from each request. This means the Host header is required. Postman will add that for you automatically if you use the domain name of your site, but it would have no idea what to use if you just provide an IP address.
See also: What is http host header?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
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.
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.
Improve this question
until recently I was using lighttpd + openvpn + sslh, to provide both HTTPS and OpenVPN on port 443. But sslh has some significant issues with passing remote IP address to HTTP server and also it does not work well with Gitlab. So I moved to nginx and now I'm trying to achieve the same functionality with OpenVPN as before.
How to configure nginx to handle incomming HTTPS connections and forward unknown connections to OpenVPN?
I know OpenVPN can do this with HTTPS, but it does not solve problems with passing remote IP address to web server (correct remote IP address is more important for web server than for OpenVPN).
Other way around may be like Websockets do, to let OpenVPN to use HTTP upgrade or similar technique, but I haven't found anything about that in OpenVPN documentation.
Nginx is not capable of looking into SSL connections to determine the protocols used to further forward the connection to either an http/https upstream, or a VPN.
It can handle any arbitrary TCP streams now (and load-balance the connections without looking into payload), but unless you have more than one port or more than one IP address, you'll have to continue to depend on your sslh.
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 8 years ago.
Improve this question
We are running a Java based web-application, and were in the process of updating the site from http:// to https:// (by installing SSL cert),but encountered issues with bringing the site online.
On further analysis, we found that the port 443 was being blocked, which was preventing this site from being accessible on https://
We informed the same to the Network team, to open firewall on port 443. But the problem is, they keep coming back asking for the destination port.
We provided the source IP (IP of the application server)...what would be the destination IP (is there a specific destination IP if a site needs to be accessible on https://) ????
My question is, what would be the destination port, to open firewall to make a site accessible on https:// ??
Most likely they want to setup NAT so that incoming requests coming to NAT:443 are routed to :443 , and for this they do need an IP of the server within the local network.
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.