2. Usage¶
2.1. Where is the resource located? (The URL)¶
2.2. How is the resource requested? (The allowed HTTP request methods)¶
GET
2.3. What response is accepted? (The supported response content types)¶
application/json
2.4. What is a query? (The valid GET requests)¶
- An IPv6 address
- A string of two or four words
Note
The tool is oblivious to the existence of IPv4 It only knows IPv6. IPv4 addresses are considered words. Handling IPv4 is left up to the implementer. It is encouraged that any implementations treat IPv4 addresses as their equivalent 6to4 prefix.
2.5. What is a response? (The valid JSON responses)¶
A query for an IPv6 address responds about that address. A query for two words responds about the /64 network those two words represent. A query for four words responds about the corresponding IP address where the first two words are its /64 network and the last two words are the 64 host bits.
2.6. What information is in a response? (The response format for valid requests)¶
- ip - The IP address in its unabbreviated form.
- compressed - The IP address in its abbreviated form.
- name - A name for easily referring to the address.
- reverse_pointer - The name of the reverse DNS PTR record for the IP address.
- ipv4_mapped - The embedded IPv4 address for addresses starting with ::FFFF/96.
- sixtofour - The embedded IPv4 address for addresses starting with 2002::/16 which are called 6to4 addresses and defined in RFC3056.
- teredo - The embedded server and client IPv4 address pair for addresses starting with 2001::/32 which are called Teredo addresses and defined in RFC4380.
- is_multicast - The address is reserved for multicast use according to RFC2373.
- is_private - The address is allocated for private networks according to the IANA special registry.
- is_global - The address is allocated for public networks according to the IANA special registry.
- is_reserved - The address is reserved by IETF.
- is_loopback - The address is a loopback address as defined in RFC2373.
- is_link_local - The address is reserved for link-local usage according to RFC3927.
2.7. What does an error look like? (The response format for invalid requests)¶
- code - An HTTP response code to indicate the type of error that occurred.
- title - The generic type of error that occurred.
- explanation - The reason the error occurred.
3. Example¶
3.1. The Request¶
> telnet iptagger.jschmedes.corp.he.net 80
Trying 2400:cb00:2048:1::681c:170...
Connected to iptagger.jasonswisdom.com.
Escape character is '^]'.
GET /api.cgi/2001:470:0:76::2 HTTP/1.1
Host: iptagger.jschmedes.corp.he.net
Accept: */*
3.2. The Response¶
HTTP/1.1 200 OK
Date: Sun, 22 Nov 2015 18:51:59 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 434
Connection: keep-alive
Set-Cookie: __cfduid=d330c662f4c78041cbfaddd0dfb90f5a41448218319; expires=Mon, 21-Nov-16 18:51:59 GMT; path=/; domain=.he.net; HttpOnly
Vary: Host
Server: cloudflare-nginx
CF-RAY: 2496d3e37583284c-SJC
{
"is_reserved": false,
"is_multicast": false,
"is_global": true,
"is_unspecified": false,
"sixtofour": null,
"ip": "2001:0470:0000:0076:0000:0000:0000:0002",
"reverse_pointer": "2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.7.0.0.0.0.0.0.0.7.4.0.1.0.0.2.ip6.arpa",
"compressed": "2001:470:0:76::2",
"ipv4_mapped": null,
"is_private": false,
"is_loopback": false,
"teredo": null,
"name": "fiction medicine neon antarctica",
"is_link_local": false
}
4. Reverse Example¶
4.1. The Request¶
>telnet iptagger.jschmedes.corp.he.net 80
Trying 2400:cb00:2048:1::681c:170...
Connected to iptagger.jasonswisdom.com.
Escape character is '^]'.
GET /api.cgi/fiction%20medicine%20neon%20antarctica HTTP/1.1
Host: iptagger.jschmedes.corp.he.net
Accept: */*
4.2. The Response¶
HTTP/1.1 200 OK
Date: Sun, 22 Nov 2015 19:05:10 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 434
Connection: keep-alive
Set-Cookie: __cfduid=d24a4aa54066bf8204bedc6edff42f6811448219109; expires=Mon, 21-Nov-16 19:05:09 GMT; path=/; domain=.he.net; HttpOnly
Vary: Host
Server: cloudflare-nginx
CF-RAY: 2496e73c6711284c-SJC
{
"is_private": false,
"is_multicast": false,
"is_loopback": false,
"is_reserved": false,
"compressed": "2001:470:0:76::2",
"is_global": true,
"ip": "2001:0470:0000:0076:0000:0000:0000:0002",
"name": "fiction medicine neon antarctica",
"reverse_pointer": "2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.7.0.0.0.0.0.0.0.7.4.0.1.0.0.2.ip6.arpa",
"sixtofour": null,
"is_link_local": false,
"ipv4_mapped": null,
"teredo": null,
"is_unspecified": false
}
Note
The responses are the same because one query is the reverse of the other i.e. 2001:470:0:76::2 has been tagged “fiction medicine neon antarctica.”