1
I think this may not be possible because of the way the TCP/IP protocol defines packets, but I figured I'd ask.
Some sites, such as those on shared servers, use the same IP and the server delivers the site based on the hostname/URL requested. In this situation, doing a DNS lookup of the site IP and going to the IP directly will usually deliver some other content that is not the site with the given hostname.
Is there a way to have it both ways and request a site using the IP address but have the request still show the hostname/url so that the server on the other still handles the request as though you provided the URL and it was resolved via DNS?
The specific use case for me is a private DNS server being down so my browser can only access via the raw IP (which I have backed up) but the site needing the URL to deliver the correct content. However I think just knowing this is possible is interesting on its own and the technique worth knowing in general.
1Why not run your own DNS server or edit the
hosts
file on the computer itself, you can hard code that hostname in to it and it won't make the request out to the slow DNS server. – Scott Chamberlain – 2013-09-22T18:27:57.913Because its a VPN and it seems like it has to pass through the vpn dns server first. My only basis for thinking this is setting an ssh proxy to a host on the remote lan which uses a different DNS server from the VPN gateway and the URL still resolving via VPN gateway DNS server. – Anthony – 2013-09-22T18:39:51.623
You could set up a local DNS server on your computer and have it go to the VPN's DNS server for any entries it does not have cached locally. – Scott Chamberlain – 2013-09-22T18:43:11.217
Wouldn't the SOCKS proxy work the same way? – Anthony – 2013-09-22T18:44:50.880