Class DnsLookup


  • public class DnsLookup
    extends Object
    XBill DNS resolver to retrieve hostnames for client IP addresses. TODO: deal with IPv6 addresses.
    Author:
    kevinvandevelde at atmire.com, ben at atmire.com
    • Method Detail

      • reverseDns

        public static String reverseDns​(String hostIp)
                                 throws IOException
        Resolve an IP address to a host name.
        Parameters:
        hostIp - dotted decimal IPv4 address.
        Returns:
        name if resolved, or the address.
        Throws:
        IOException - from infrastructure.
      • forward

        public static String forward​(String hostname)
                              throws IOException
        Resolve a host name to an IPv4 address.
        Parameters:
        hostname - hostname to resolve to IP
        Returns:
        IPv4 address
        Throws:
        IOException - from infrastructure or no resolution.