Conditions for working IP addresses are registered in the DNS reverse zones. We can access the DNS server and get information using the network. People register their Whois data in RIRs' database.