I'll second that. We have a little program that presents a rest api for dns type stuff. I've never really used the reverse stuff, but it works. Looks like it mostly returns a ptr record however. Not sure if that is what you are looking for.
https://github.com/fcambus/rrda is what we run, and combining it with a query we use to monitory for SSL 5250 connections looks like this.
WITH netstat AS (
SELECT *
FROM QSYS2.NETSTAT_INFO
WHERE local_port = 992
)
SELECT DISTINCT
(
SELECT COALESCE(
JSON_VALUE(httpresponse.responsemsg,
'$.answer.rdata' RETURNING VARCHAR(256)),
JSON_VALUE(httpresponse.responsemsg, '$.message' RETURNING VARCHAR(256)))
FROM TABLE (
SYSTOOLS.HTTPGETCLOBVERBOSE(
URL => CAST(
'
http://172.24.1.36:8080/8.8.8.8:53/x/' CONCAT
TRIM(netstat.remote_address) AS VARCHAR(255)),
HTTPHEADER => CAST(
'<httpHeader includeErrorMsg = "true"></httpHeader>' AS CLOB(1K)))) AS httpresponse) AS dns_lookup,
netstat.remote_address
FROM netstat
;
Gives me this
Some name that ought to exist, does not exist (NXDOMAIN) ::
068-117-204-187.res.spectrum.com. 68.117.204.187
Some name that ought to exist, does not exist (NXDOMAIN) 170.249.188.136
Some name that ought to exist, does not exist (NXDOMAIN) 172.24.1.226
wsip-70-183-112-48.no.no.cox.net. 70.183.112.48
45-25-16-60.lightspeed.nworla.sbcglobal.net. 45.25.16.60
Some name that ought to exist, does not exist (NXDOMAIN) 99.96.108.75
Some name that ought to exist, does not exist (NXDOMAIN) 192.168.2.140
Some name that ought to exist, does not exist (NXDOMAIN) 69.85.247.234
wsip-24-252-232-166.no.no.cox.net. 24.252.232.166
Some name that ought to exist, does not exist (NXDOMAIN) 10.2.7.115
107-195-140-211.lightspeed.nworla.sbcglobal.net. 107.195.140.211
66-208-198-233-Memphis.hfc.comcastbusiness.net. 66.208.198.233
104-56-70-137.lightspeed.nworla.sbcglobal.net. 104.56.70.137
Some name that ought to exist, does not exist (NXDOMAIN) 0.0.0.0
Some name that ought to exist, does not exist (NXDOMAIN) 172.24.1.225
99-188-191-112.lightspeed.brhmal.sbcglobal.net. 99.188.191.112
On Thu, 2021-07-08 at 10:10 -0500, David Gibbs via MIDRANGE-L wrote:
On 7/8/21 7:59 AM, Larry "DrFranken" Bolhuis wrote:
Is anyone aware of a way to translate an IP address returned by SQL to
its FQDN?
Although I haven't tried any of them, there are a number of web services
that offer DNS lookup's that should be relatively easy to consume from
SQL.
Here's one:
https://dns-lookup.whoisxmlapi.com/api
david
--
I'm riding in the American Diabetes Association's Tour de Cure to raise
money for diabetes research, education, advocacy, and awareness. You
can make a tax-deductible donation to my ride by visiting
https://mideml.diabetessucks.net.
You can see where my donations come from by visiting my interactive
donation map ...
https://mideml.diabetessucks.net/map (it's a geeky thing).
[
https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
As an Amazon Associate we earn from qualifying purchases.