|
Ooooh, I'm liking this.
MUCH good stuff in this thread so far!!
- L
On 7/8/2021 12:59 PM, Kevin Bucknum wrote:
I'll second that. We have a little program that presents a rest api fordns 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.
httpresponse) AS dns_lookup,
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
netstat.remote_address170.249.188.136
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)
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.4899.96.108.75
45-25-16-60.lightspeed.nworla.sbcglobal.net. 45.25.16.60
Some name that ought to exist, does not exist (NXDOMAIN)
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.16610.2.7.115
Some name that ought to exist, does not exist (NXDOMAIN)
107-195-140-211.lightspeed.nworla.sbcglobal.net. 107.195.140.211172.24.1.225
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)
99-188-191-112.lightspeed.brhmal.sbcglobal.net. 99.188.191.112thing).
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
Bucknum
[https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin
Senior Programmer Analystconfidential information, belonging to the sender that is legally
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
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.
--
IBM Champion for Power Systems
www.iInTheCloud.com - Commercial IBM i and Power System Hosting
www.iDevCloud.com - Personal IBM i Hosting
www.Frankeni.com - IBM i and Power Systems Consulting.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.