I wonder how services performing reverse NS lookup work. So basically let's say we have a server with an IP address. That server has a ns record, to which some other domains point.
So for example here, https://viewdns.info/reversens/ When we specify ns1.example.com we see all domains pointing there. How one would approach it programmatically?