Thursday, October 22, 2009

snmpwalk and netcat

1. snmpwalk

from Linux/ UNIX gateway:
# snmpwalk -v [1|2c|3] -c [COMMUNITY] [IP Router] | grep -i [Port]
from router:
# show snmp mib Ifmib ifindex [interface] [port]

2. netcat

I use it to retrieve detail information about AS Number, Country, etc. based on IP address:

# netcat whois.cymru.com 43 < [filename-original].txt > [filename-output].txt
The file is batch file containing more than 1 IP address, and this is the format for the file:
a. should be save in MS-DOS text format
b. in the body file:
begin
verbose
[IP address 1]
[IP address 2]
[IP address 3]
and so on..
..
..
end
That will do. The proccess takes a few minutes depending on how much IP address in the file. After completing, you can take a look at the file and you'll be surprise :)

No comments:

Post a Comment

Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)