exarkun at divmod.com
Wed Jul 13 22:06:06 CEST 2005
On Wed, 13 Jul 2005 15:22:35 -0400, Chris Lambacher <lambacck at computer.org> wrote:
>reverse dns lookup is not really special compared to a regular dns lookup.
>you just need to look up a special name:
>to format the ip address properly use something like:
> nums = ip_str.split('.').reverse()
> nums.extend(('in-addr', 'arpa'))
> return '.'.join(nums)
It may not be special, but it is different. Reverse DNS uses PTR records, not A records. The site you referenced points this out, too:
Reverse DNS entries are set up with PTR records (whereas standard DNS uses A
records), which look like "188.8.131.52.in-addr.arpa. PTR host.example.com"
(whereas standard DNS would look like "host.example.com. A 192.0.2.25").
More information about the Python-list