How is the dotted decimal IP address "1.2.3.4.5" interpreted and resolved?

3

The Apache Mina Ftpserver project has a unit test that checks that the IP address 1.2.3.4.5 fails to be resolved by the OS's name resolution. Specifically, the expected result of:

InetAddress.getByName("1.2.3.4.5")

is "unknown host".

When I run this on Mac OS X 10.9.2, the (what appears to be a) dotted decimal IP address 1.2.3.4.5 does in fact resolve to an IP address. Based on who owns the resolved IP, it appears to belong to my ISP (and I doubt this is coincidental).

What is happening here? How is 1.2.3.4.5 being interpreted and resolved in this case?

Greg Kopff

Posted 2014-04-13T12:23:05.833

Reputation: 237

Answers

4

Is your ISP serving an error page instead of sending NXDOMAIN errors?

http://en.wikipedia.org/wiki/DNS_hijacking#Manipulation_by_ISPs

Try visiting the page in your browser. If you're seeing an error page that is not generated by your browser, consider configuring your system to use a third-party DNS server, such as Google DNS.

Vladimir Panteleev

Posted 2014-04-13T12:23:05.833

Reputation: 775

The browser request responded with 'Bad Request (Invalid Hostname), and switching to Google DNS has fixed it (ping now reports unknown host). – Greg Kopff – 2014-04-13T12:38:50.857

-1

You can't have an IP address like this one (1.2.3.4.5).
IP address has to be 4 octets only (1.2.3.4)
This is not an IP address, and it will never resolve!

ITProStuff

Posted 2014-04-13T12:23:05.833

Reputation: 389