Eaden McKee home blog

How Vodafone broke my hosts file and redefined "tech" in the process

This post is going to be very technical, so to my non-technical readers ( and Vodafone tech support, see below ), I apologize.

Among other things, I am a web developer. Part of a web developer's job is to get the website up and running on a web server. Sometimes we need to change websites from one server to another. Often when doing this we rely on our "hosts" file to override the IP address our browser tries to connect to. Before I go any further, if I've lost you already, there no point carrying on.

So you type in www.eadz.co.nz into your browser. Your browser asks your OS for the IP address of www.eadz.co.nz through the DNS system. Once we have the IP address, say 1.2.3.4 our browser connects to port 80 of 1.2.3.4 and starts a HTTP dialogue to request the web page www.eadz.co.nz. Right? Well with vodafone, wrong!

The end result of whatever proxy/routing/cisco magic Vodafone is using is that Vodafone completely ignores the IP address when I visit a site, causing the hosts file not to work.

A quick demonstration; lets telnet to Google's server and ask for Yahoo's website. In a ISP setup this wouldn't work.

telnet google.com 80
Trying 66.102.11.104...
Connected to google.com.
Escape character is '^]'.
GET / HTTP/1.1                  
Host: www.yahoo.com

HTTP/1.1 302 Found
Date: Mon, 16 Aug 2010 18:38:30 GMT
P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="...snip..."
Cache-Control: private
Location: http://nz.yahoo.com/?p=us
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
Age: 0
Server: YTS/1.18.5
......

As you can see I get a response redirecting me to nz.yahoo.com, this response did not come from the ip address 66.102.11.104 which I tried to telnet to, but from what Vodafone believes yahoo's servers to be.

It is easy to see how this breaks the hosts file. You put an entry of 123.123.123.123 www.mydomain.com in your hosts file and you try to visit the site. While your browser will try to connect to the IP 123.123.123.123 vodafone will intercept this request and instead ask whatever IP Vodafone believes to belong to www.mydomain.com instead for the website.

For another couple of examples of this sillyness, lets connect to an unassigned IPv4 address. With IPv4 addresses running out very soon this demonstration will no longer be possible. So lets to go IANA and look for the blocks of unassigned ip addresses. So 105/8 is unallocated.. so there should be no website there right? Especially IANA's..

telnet 105.1.1.1 80
Trying 105.1.1.1...
Connected to 105.1.1.1.
Escape character is '^]'.
GET / HTTP/1.1
Host: www.iana.org

HTTP/1.1 200 OK
Server: Apache/2.0.63 (CentOS)
Accept-Ranges: bytes
Content-Type: text/html; charset=UTF-8
Date: Tue, 31 Aug 2010 08:51:02 GMT
Content-Length: 5200
Connection: Keep-Alive
Age: 203

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
<html xmlns="http://www.w3.org/1999/xhtml" 
<head>
	<title>IANA — Internet Assigned Numbers Authority</title>


So once I had decided my hosts problem was due to Vodafone, I called them up. I tried both the consumer internet support and the business line, and neither contact centers had anyone who could help me, due no no-one knowing much about how HTTP works. I'm under no illusion that for the majority of people this crazy proxy stuff doesn't affect them, and that Vodafone's tech support will be perfectly adequate for most users. However it is a real shame that there was no one who could even discuss this matter with me. In frustration I asked if there was anyone there with a networking qualifications or computer science degree but I was told there was not, so my problem remains unsolved.

So is this Tech support? Vodafone sells access to the Internet, and when it comes down to it the Internet is a collection of protocols. So should their "Tech" support be able to support the protocols that make up the "Internet"? Or just Layer 7 services like email and web browsing? What does "Tech Support" from an ISP mean to you?

With all that said this is not a dig at Vodafone, I'm pretty happy with their services and I don't expect much different from other large ISPs. In the interests of full disclosure I called at the weekend, but vodafone's website advertises "24/7 tech support" so this shouldn't make a difference.

Other Posts