I am looking for away on the linux command line to list all the websites associated with 1 IP
There is no such command. And you may want to start your question in fact by specifying WHY you need that information from the first place.
I know some website can provide this information but I don't think the list is always complete.
It is never complete because it can't be.
How everyone is doing it is basically starting with a list of names, resolving them, hence getting IP addresses, and storing the results. Once you did that with enough names, you can now do inverse searches because you stored all the data. If you are at appropriate places on the Internet, you can also passively monitor recursive DNS data, showing what people are searching for - in terms of names resolution - and hence capture replies which will have the name to IP mapping, which you can then trivially reverse.
Obviously you will never get all the data that way, and name/IP association can change in both time and space (depending from where you ask, because of geolocation, etc.), so the results are far from exhaustive and precise.
I have tried dig, and whois and a few other commands but none seem to give me more than a single dns lookup.
As they are designed to do... (except that whois
does not do DNS queries by the way).
Some people will tell you about DNS PTR
records that supposedly maps IP addresses back to names, but:
- they are not needed for day to day operations (they are vaguely needed for email operations, absolutely not for web operations)
- hence very little IP addresses have those records
- and even if a webhosting company uses them, for an IP address hosting hundreds of names (as mass virtual hosting is possible nowadays for both HTTP and HTTPS), the
PTR
record will probably just show one name, not all of them (few clients would cope with PTR
records with multiple names anyway)