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
0
votes
1 answer

Storing key-value pairs in DNS request

What is the recommended place for storing key-value pairs in a DNS request? I'm designing a system where the DNS requests traverse multiple hops. Some hops may need to append key-value pairs to the traversing DNS request. I thought about adding a…
manash
  • 6,985
  • 12
  • 65
  • 125
0
votes
2 answers

Choose root DNS server to use

I want to choose what DNS server to use. I will make potentially multiple choices in the same JVM. I want to resolve IP addresses from hostnames. Things I have considered: Using System.setProperty to set DNS settings for Java, but scoping it using…
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
0
votes
1 answer

Retrieving DNS SRV records on Android using service name

On android I want to find list of records just by using service name. I have tried api's like dnsjava and jmdns but all returned empty results. I have come across this similar Question but no one has answered it either: Lightweight way to resolve…
0
votes
2 answers

dnsjava - How to do a Lookup with DNSSEC validation?

dnsjava has DNSSEC support. I'd like to do a simple Lookup, just like the Lookup examples ( http://www.xbill.org/dnsjava/dnsjava-current/examples.html ), but have dnsjava tell me if it validates DNSSEC. (Or, raise an exception if it doesn't.) I've…
SRobertJames
  • 8,210
  • 14
  • 60
  • 107
0
votes
1 answer

How do I update a PTR record on a DDNS server, with dnsjava?

I am able to update A, AAAA, and TXT records without an issue. Unfortunately, I haven't yet been able to find any examples of how to update a PTR record. Here's the code I'm using to send the updates: public void sendA(Name host, Name zone, String…
0
votes
2 answers

dnsjava and Android

I have an Android app to which I am trying to add DNS SRV record detection. I know it is possible, based on the existence of apps such as DNS Lookup, which I have installed, and it works just fine. I am using dnsjava and this code runs fine as a…
Big-O Claire
  • 956
  • 8
  • 13
0
votes
1 answer

dnsjava can't resolve "localhost" on Linux machine

After I registered dnsjava as default Java DNS provider I get a problem. It can't resolve local addresses which described in /etc/hosts file on my Linux machine. This file look something like this: 127.0.0.1 localhost 127.0.1.1 servername So if…
artspb
  • 1,127
  • 1
  • 10
  • 19
0
votes
2 answers

How to get multiple domains for the single IP?

Here's the method- public static String getHostByAddr(byte[] addr) throws UnknownHostException { Name name = ReverseMap.fromAddress(InetAddress.getByAddress(addr)); final String[] servers = new String[] {"208.67.220.220",…
Sudhanshu Umalkar
  • 4,174
  • 1
  • 23
  • 33
0
votes
1 answer

Asking DNS server for record and checking authoritative

How can I ask DNS server e.g 8.8.8.8 for google.com domain? On this http://www.xbill.org/dnsjava/dnsjava-current/examples.html page is example how can you send request for specified domain, but how can ask concrete server and check if answer is…
OnTheFly
  • 2,059
  • 5
  • 26
  • 61
-1
votes
1 answer

Querying DNS spam service doesn't work properly with DNSJava

I'm developing a function that queries a list of DNS servers using DNSJava library to check if a specific domain is blacklisted. Here you have the portion of code that make the check. At the end you will find the output of the function; for the test…
mark
  • 939
  • 2
  • 13
  • 36
1 2
3