Skip to content
IPv4 cache refreshed 15 hr ago  ◆  IPv6 cache refreshed 14 hr ago  ◆  Prefixes in table 1,130,374 v4 · 264,818 v6  ◆  Peers 80 v4 · 20 v6  ◆  whois.pwhois.org:43 answering  ◆ 
Prefix WhoIs The Prefix
WhoIs Project
server software

Run your own view
of the Internet.

Your routers, your route-views, your pWhoIs — same protocol, your perspective. The package that runs the public service is the package you download here.

pWhoIs serverv2.2.1.0
pwhois-2.2.1.0.tgz 122 KB
md5 7a1baa807613b298845cc1fd56d1f458

Direct link: pwhois-2.2.1.0.tgz

Perl + PostgreSQL. Includes documentation, install.sh, init script, sample cron and route-views list.

Only enter an address if you want release announcements. The list is very low-volume. Privacy notice.

Two components, one protocol

Prefix WhoIs displays the origin AS and other interesting information related to the most-specific prefix currently advertised within the Internet's global routing table that corresponds to the address in your query. The package makes that possible with two programs:

  1. pwhois-updatedb downloads the global routing table from a router or route-view server of your choosing and stores it in PostgreSQL — today that is over a million IPv4 prefixes and a quarter-million IPv6 prefixes, and several million unique entries from some route-views. Run it from cron at an interval of your choosing; we recommend no more often than every four hours, to be considerate of the route-view server you pull from. It merges new data and expires records that have left the table, so disk use stays bounded.
  2. pwhoisd serves the information to clients over the whois protocol (43/tcp). It supports the internal pwhois format, Team Cymru's output format, and RPSL (RFC 2622), plus bulk queries for integration with other processes — including Layer Four Traceroute.
your server, first query
$ whois -h localhost help
Have no fear, help is here:

$ whois -h localhost 4.2.2.1
IP: 4.2.2.1
Origin-AS: 3356
Prefix: 4.0.0.0/9
AS-Path: … your peers' view …
Why run your own? The public server's AS paths are from its peers' vantage point. If you need the view from your own network — or a private answer service with the same semantics — feed the updater from your routers.

Getting it running

1·REQUIREMENTS

A current Perl 5 with DBD::Pg and libpq, and a current PostgreSQL. Plan on a few gigabytes of RAM for the in-memory patricia tree when loading a full table, plus what your database needs.

2·INSTALL

Unarchive the package and run ./install.sh as root. It asks a few questions and handles users, binaries, the init script, database tables, cron and the configuration file. Everything it does can also be done by hand.

3·FEED & SERVE

Import your first table with pwhois-updatedb, start pwhoisd, and connect with any whois client. The operations guide covers the sample configs and public route-view sources.