J
J
JunDevTest2018-09-29 04:48:08
PHP
JunDevTest, 2018-09-29 04:48:08

Is it possible to determine the PTR record of an IP address using Nginx? If yes, how correct is this?

Hello.
There was a task to filter IP addresses by PTR records, it is best (in my opinion) to do this using Nginx.
PHP (this host's backend) has a function dns_get_record("ip address", DNS_PTR) that does what I need.
However, how effective its use will be, in comparison with Nginx tools, I do not know. In addition, I would like to implement what was conceived in the config itself, without using PHP and without creating an extra load on the low-cost machine.
I know that nginx supports Lua as a scripting language, but I have never written in it. Perhaps there is some module for working with DNS records?
Thank you for attention. Have a good day.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-09-29
@dimonchik2013

https://github.com/openresty/lua-resty-dns#type_ptr

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question