Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Using the stock whois (on Fedora) I can easily get information for an IP adress:

$ whois SOME_IP
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
[..]
% Information related to 'SOME_IP/SOME_AS'
route:     SOME_ROUTE
mnt-by:    SOME_STRING
[..]

Now I want to inverse lookup entries that have the SOME_STRING in 'mnt-by'.

I've done that successfully via the RIPE web interface.

But how to do that via the command line?

(e.g. for easier post-processing/scripting)

RIPE documents the -i option, but:

$ whois.md -h riswhois.ripe.net -i mnt-by SOME_STRING
Warning: RIPE flags used with a traditional server.
[just options listing without -i]
$ jwhois -h riswhois.ripe.net -i mnt-by SOME_STRING
[Querying riswhois.ripe.net]
[riswhois.ripe.net]
% This is RIPE NCC's Routing Information Service
% whois gateway to collected BGP Routing Tables
% IPv4 or IPv6 address to origin prefix match
%
% For more information visit http://www.ripe.net/ris/riswhois.html

% ERROR: Invalid search key

Am I supposed to use another whois client for such queries?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The documented RIPE whois options work with whois.md and the right RIPE whois server address:

$ whois.md -h whois.ripe.net -i mnt-by SOME_STRING
[..]
route:          SOME_ROUTE
descr:          SOME_DESC
origin:         SOME_AS
mnt-by:         SOME_STRING
source:         RIPE # Filtered
[.. more entries ..]

With GNU jwhois one has to explicitly tell that -i ... should be part of the query:

$ jwhois -h whois.ripe.net -- -i mnt-by SOME_STRING
[Querying whois.ripe.net]
[whois.ripe.net]
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

[..]
route:          SOME_ROUTE
descr:          SOME_DESC
origin:         SOME_AS
mnt-by:         SOME_STRING
source:         RIPE # Filtered
[.. more entries ..]

Note the -- marker in the command. Else -i is interpreted as a jwhois option.

share|improve this answer
    
jwhois -h whois.ripe.net -- -i mnt-by SOME_STRING works though –  Stéphane Chazelas Dec 9 '12 at 13:07
    
@StephaneChazelas, interesting, I'll update the answer. –  maxschlepzig Dec 9 '12 at 17:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.