While trying to setup OpenDNS, and failing to make website filtering actually work, I realized my ISP is doing something nefarious with all HTTP requests. To make a long story short, if there's a Host:
header, it doesn't matter what IP address I use, the website I get depends on the Host:
header and nothing else.
It also seems to automatically use HTTP/1.1 even if I specify HTTP/1.0 in the request.
Examples:
Connect to google.com
with Host: yahoo.com
$ echo -e "HEAD / HTTP/1.0\r\nHost: yahoo.com\r\n\r\n" | nc google.com 80
HTTP/1.1 301 Moved Permanently
Date: Mon, 02 Jan 2012 10:50:13 GMT
Location: http://www.yahoo.com/
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
Cache-Control: private
Age: 0
Server: YTS/1.20.0
Connection: close
$
Connect to an invalid IP address with Host: yahoo.com
$ echo -e "HEAD / HTTP/1.0\r\nHost: yahoo.com\r\n\r\n" | nc 1.0.0.0 80
HTTP/1.1 301 Moved Permanently
Date: Mon, 02 Jan 2012 10:51:02 GMT
Location: http://www.yahoo.com/
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
Cache-Control: private
Age: 0
Server: YTS/1.20.0
Connection: close
$
So, what is my ISP doing? And should I complain to them?