Bulk Lookup Owner of IP Address

September 18, 2019

To perform a bulk whois lookup of a list of IP addresses use the following script:

Bulk whois lookup

while read ip; do if [ ! -z "$ip" ]; then echo -n "$ip - " && whois $ip 2>/dev/null grep "Organization" -m 1; fi; done < ip_list.txt

Example input (ip_list.txt)

172.217.8.206
172.217.8.203
172.217.8.266
151.101.65.67

Output

172.217.8.206 - Organization:   Google LLC (GOGL)
172.217.8.203 - Organization:   Google LLC (GOGL)
172.217.8.266 - 98.138.219.231 - Organization:   Oath Holdings Inc. (OH-207)
151.101.65.67 - Organization:   Fastly (SKYCA-3)