Questions tagged [dnsjava]

`dnsjava` is an implementation of the DNS protocol in Java.

dnsjava is an implementation of the DNS protocol in Java. It supports all defined DNSSEC record types as well as unknown types. It can be used for queries, zone transfers, and dynamic updates. It includes a cache that can be used by clients and a minimal implementation of a server. It supports TSIG authenticated messages, partial DNSSEC verification, and EDNS0.

dnsjava provides features and functionality beyond those which exist in the InetAddress class. dnsjava is written in pure Java, therefore it is fully multithreaded and in many cases is faster than the InetAddress.

dnsjava provides different levels of access to DNS. The high-level access allows it to perform queries for records of a given name, type, and class, and to return the answer or reason for failure. There are also functions similar to those in the InetAddress class. A cache is used to reduce the number of DNS queries sent. The low-level access allows the direct manipulation of DNS messages and records, as well as allowing additional resolver properties to be set.

It includes a simple tool for doing DNS lookups, a dig clone, and a dynamic update client, as well as a simple authoritative-only server.

40 questions
7
votes
1 answer

How to change the java DNS service provider

I'm building a fast web crawler and I need to have multithreaded DNS resolution, so I picked up a multithreaded DNS service provider called dnsjava. Unfortunately, I can't figure out how to replace the default DNS Service Provider. I went over the…
Kiril
  • 39,672
  • 31
  • 167
  • 226
6
votes
1 answer

Proguard to obfuscate Android code with DNSJava library

I have an android app which has dnsjava.jar in the /libs/ directory of the project. Everything built fine and can be packaged into APK (without proguard). However, when i introduced proguard into the project.properties (in eclipse), i get the…
Pell
  • 81
  • 1
  • 3
3
votes
0 answers

dnsjava - Create new Record

I am assigned a task to update the zone files. And I found dnsjava. However, when using it to add a new Record, I am successfully creating new records using the classes NSRecord, ARecord. But since there are many such classes, can I use Record class…
Sameer Anand
  • 274
  • 2
  • 13
2
votes
2 answers

Android dnsjava NoClassDefFoundError: Failed resolution of: Ljava/time/Duration;

I'm getting a NoClassDefFoundError with my app. I'm using dnsjava, okhttp3 and retrofit. My min API is 19. I read that the java.time package was added in API 26. Does this mean that I can't use dnsjava for Android API lower than 26? Or does…
user10981072
2
votes
0 answers

How to query authoritative dns server in java to get txt records instantly

I am trying to validate txt records in the dns in order to verify if a domain is owned by an entity. To do this I will ask the domain owner to add a txt record I provide. After they make the change I need to instantly check whether the txt value is…
2
votes
1 answer

Why does dnsjava not retrieve all records?

I'm using the following code (dnsjava) to retrieve records from dns. Record[] records1 = null; Lookup look; try { look = new Lookup(domainName,Type.A); try { look.setResolver(new SimpleResolver(ipAddress)); } catch…
Anu
  • 177
  • 1
  • 1
  • 12
2
votes
1 answer

DNS automation in a private cloud using DNSJava

I am trying to create a DNS service (automation of various DNS operations) to serve our existing private cloud. I am looking for options and ideas to do this. Is there any existing Java API to do this? Please suggest. I made a research on the…
eddyrokr
  • 414
  • 1
  • 8
  • 23
2
votes
1 answer

Find nameservers of a domain

How can I find the nameservers of a domain name like google.com using Java? I m using "dnsjava" library to find out the host details, MX records, bind version and zone transfer. But I m unable to find a way to find the nameserver for a domain using…
Sonia Sharma
  • 137
  • 1
  • 2
  • 8
2
votes
0 answers

add/delete dns entries in a bind dns server zones using dnsjava

I searched a lot but I didn't find a clear answer. My goal is to make java methods that can add and delete dns entries from a dns server. I installed and configured bind9 dns server on a debian VM. I'm using dnsjava library. I can read from the dns…
1
vote
3 answers

java.lang.NoClassDefFoundError thrown for static method but not for static member

Working with the dnsjava library, I've encountered a frustrating and confusing problem where I can call Type.A properly but calling Type.value(str) throws a java.lang.NoClassDefFoundError. System.out.println(org.xbill.DNS.Type.A); // works if…
kwarrick
  • 5,930
  • 2
  • 26
  • 22
1
vote
1 answer

com.android.builder.dexing.DexArchiveBuilderException: Failed to process D:....\app\build\intermediates\transforms\desugar\debug\13.jar

I am working with an app in Android Studio. I need to use Java version 8 so I can use one library(dnsjava: https://github.com/dnsjava/dnsjava ). When I try to use java version 8 writing this in my build.gradle (:app) file: compileOptions { …
Alejandro
  • 11
  • 2
1
vote
1 answer

dnsjava returns network error on lookup.run()

I'm using dnsjava in my android app to retrieve a txt file on the first time the app starts up. val lookup = Lookup(domain, Type.TXT) lookup.setResolver(SimpleResolver()) val records = lookup.run() if (lookup.result == Lookup.SUCCESSFUL) …
pingOfDoom
  • 408
  • 1
  • 4
  • 21
1
vote
0 answers

MapReduce Job is hung at map=12%,how could I go through it?

I wrote a HiveQL script like: create temporary function getdomainips as 'com.is.mail.domainspf.IpFromDomainExtract'; select Domain,getdomainips(Domain) as ips from tmp_domain; And IpFromDomainExtract class is as followings: package…
user2351281
  • 137
  • 1
  • 8
1
vote
1 answer

Using dnsjava to resolve a given IP to its Hostnames

I want to get a list of all registered Domains for a given IP Address . Could I use PTR records. I tried the following ip = "217.13.68.220"; l = new Lookup(ip, Type.PTR ); l.setResolver(new SimpleResolver("8.8.8.8")); l.run(); This IP should be…
Aloras
  • 23
  • 5
1
vote
1 answer

How to put in an entry into dnsjava cache to override DNS lookup

In trying to avoid having a hostname looked up from the public DNS for testing purposes, I need to essentially set /etc/hosts file, but I don't always know what hostnames I'll need to override the IP address for, so I'm trying to use dnsjava since…
Drizzt321
  • 993
  • 13
  • 27
1
2 3