Skip to content

reverse_ip

local reversed = kumo.dns.reverse_ip(IP)
Since: Dev Builds Only

The functionality described in this section requires a dev build of KumoMTA. You can obtain a dev build by following the instructions in the Installation section.

Given an IP address in either V4 or V6 format as the input, returns the reversed address.

This function is purely local string manipulation; no actual DNS queries are performed.

print(kumo.dns.reverse_ip '127.0.0.1')
-- prints out:
-- 1.0.0.127
print(kumo.dns.reverse_ip '::1')
-- prints out:
-- 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0