Strewth!

Insert Wit Here

A simple IP Address reflector

Or, Why the hell do I have to build every tool myself. I find it incredible that no one else has wanted this before.

In the course of another side project I needed to determine a nodes externally visible IP Address and FQDN. After a while I eventually found this forum post. And their “bot” url does work, though it’s a bit limited. So I hacked up some simple PHP to do it in a flavor that I like.

donavanm$  curl   http://www.strewth.org/ip.php
{"ipaddress":"98.207.236.52","fqdn":"c-98-207-236-52.hsd1.ca.comcast.net"}

Will also accept source and (reasonable) timeout parameters. A simple TCP connection is attempted back to your IP and specified port. Handy to see if NAT/iptables/etc is functioning.

donavanm$  curl   http://www.strewth.org/ip.php?port=80
{"ipaddress":"98.207.236.52","fqdn":"c-98-207-236-52.hsd1.ca.comcast.net","port":{"80":false}}

Get the source or try it yourself.

Written by donavan

2011/02/10 at 19:16

Posted in Software

Tagged with