-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 2008-03-11 a las 13:32 +0100, Camaleón escribió:
El 11/03/08, Carlos E. R. escribió:
Me lo tengo a medio estudiar, no he terminado :-)
"En casa del herrero"... ya se sabe >:-).
La mía es de haya, a la caoba no llego. :-p
Traps, eso es lo que quiero capturar. ¿Con que daemon?
Lo tienes instalado pero no configurado. Toca leer el manual, la wiki y la faq de "net-snmp".
Ya... Es que en el curso de redes que hice de eso no hablaron. De cómo piratear el windows si >:-)
El programa snmpwalk no acepta v2:
Eso no puede ser :-?
...
-v 1 | 2c | 3
Ah, claro, 2c. Siempre se me olvida. Lo sabía, ojo, que lo hice hace meses. Mira que son puñeteros. Vale, pues esto es lo que tira: SNMPv2-MIB::sysDescr.0 = STRING: Broadcom Bcm963xx Software Version 2.20L.01 SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.4413.2.10 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (265232933) 30 days, 16:45:29.33 ¿30 dias? :-o SNMPv2-MIB::sysContact.0 = STRING: unknown SNMPv2-MIB::sysName.0 = STRING: Broadcom SNMPv2-MIB::sysLocation.0 = STRING: unknown SNMPv2-MIB::sysServices.0 = INTEGER: 72 IF-MIB::ifNumber.0 = INTEGER: 11 IF-MIB::ifIndex.1 = INTEGER: 1 IF-MIB::ifIndex.2 = INTEGER: 2 IF-MIB::ifIndex.3 = INTEGER: 3 IF-MIB::ifIndex.4 = INTEGER: 4 IF-MIB::ifIndex.5 = INTEGER: 5 IF-MIB::ifIndex.6 = INTEGER: 6 IF-MIB::ifIndex.7 = INTEGER: 7 IF-MIB::ifIndex.8 = INTEGER: 8 IF-MIB::ifIndex.9 = INTEGER: 9 IF-MIB::ifIndex.10 = INTEGER: 10 IF-MIB::ifIndex.11 = INTEGER: 11 IF-MIB::ifDescr.1 = STRING: lo IF-MIB::ifDescr.2 = STRING: atm0 IF-MIB::ifDescr.3 = STRING: cpcs0 IF-MIB::ifDescr.4 = STRING: dsl0 IF-MIB::ifDescr.5 = STRING: eth0 IF-MIB::ifDescr.6 = STRING: usb0 IF-MIB::ifDescr.7 = STRING: wl0 IF-MIB::ifDescr.8 = STRING: br0 IF-MIB::ifDescr.9 = STRING: nas_8_32 IF-MIB::ifDescr.10 = STRING: nas_8_36 IF-MIB::ifDescr.11 = STRING: ppp_8_32_1 IF-MIB::ifType.1 = INTEGER: softwareLoopback(24) IF-MIB::ifType.2 = INTEGER: atm(37) IF-MIB::ifType.3 = INTEGER: aal5(49) IF-MIB::ifType.4 = INTEGER: adsl(94) IF-MIB::ifType.5 = INTEGER: ethernetCsmacd(6) IF-MIB::ifType.6 = INTEGER: ethernetCsmacd(6) IF-MIB::ifType.7 = INTEGER: ethernetCsmacd(6) IF-MIB::ifType.8 = INTEGER: ethernetCsmacd(6) IF-MIB::ifType.9 = INTEGER: ethernetCsmacd(6) IF-MIB::ifType.10 = INTEGER: ethernetCsmacd(6) IF-MIB::ifType.11 = INTEGER: ppp(23) IF-MIB::ifMtu.1 = INTEGER: 16436 IF-MIB::ifMtu.2 = INTEGER: 0 IF-MIB::ifMtu.3 = INTEGER: 65535 IF-MIB::ifMtu.4 = INTEGER: 0 IF-MIB::ifMtu.5 = INTEGER: 1500 IF-MIB::ifMtu.6 = INTEGER: 1500 IF-MIB::ifMtu.7 = INTEGER: 1500 IF-MIB::ifMtu.8 = INTEGER: 1492 IF-MIB::ifMtu.9 = INTEGER: 1500 IF-MIB::ifMtu.10 = INTEGER: 1500 IF-MIB::ifMtu.11 = INTEGER: 1492 IF-MIB::ifSpeed.1 = Gauge32: 0 IF-MIB::ifSpeed.2 = Gauge32: 1024000 IF-MIB::ifSpeed.3 = Gauge32: 1024000 IF-MIB::ifSpeed.4 = Gauge32: 1024000 IF-MIB::ifSpeed.5 = Gauge32: 100000000 IF-MIB::ifSpeed.6 = Gauge32: 0 IF-MIB::ifSpeed.7 = Gauge32: 0 IF-MIB::ifSpeed.8 = Gauge32: 0 IF-MIB::ifSpeed.9 = Gauge32: 0 IF-MIB::ifSpeed.10 = Gauge32: 0 IF-MIB::ifSpeed.11 = Gauge32: 0 IF-MIB::ifPhysAddress.1 = STRING: IF-MIB::ifPhysAddress.2 = STRING: IF-MIB::ifPhysAddress.3 = STRING: IF-MIB::ifPhysAddress.4 = STRING: IF-MIB::ifPhysAddress.5 = STRING: 0:30:da:70:d7:ea IF-MIB::ifPhysAddress.6 = STRING: 0:30:da:70:d7:eb IF-MIB::ifPhysAddress.7 = STRING: 0:3:c9:e7:35:94 IF-MIB::ifPhysAddress.8 = STRING: 0:30:da:70:d7:ea IF-MIB::ifPhysAddress.9 = STRING: 0:30:da:70:d7:ed IF-MIB::ifPhysAddress.10 = STRING: 0:30:da:70:d7:ee IF-MIB::ifPhysAddress.11 = STRING: IF-MIB::ifAdminStatus.1 = INTEGER: up(1) IF-MIB::ifAdminStatus.2 = INTEGER: up(1) IF-MIB::ifAdminStatus.3 = INTEGER: up(1) IF-MIB::ifAdminStatus.4 = INTEGER: up(1) IF-MIB::ifAdminStatus.5 = INTEGER: up(1) IF-MIB::ifAdminStatus.6 = INTEGER: down(2) IF-MIB::ifAdminStatus.7 = INTEGER: down(2) IF-MIB::ifAdminStatus.8 = INTEGER: up(1) IF-MIB::ifAdminStatus.9 = INTEGER: up(1) IF-MIB::ifAdminStatus.10 = INTEGER: up(1) IF-MIB::ifAdminStatus.11 = INTEGER: up(1) IF-MIB::ifOperStatus.1 = INTEGER: up(1) IF-MIB::ifOperStatus.2 = INTEGER: up(1) IF-MIB::ifOperStatus.3 = INTEGER: up(1) IF-MIB::ifOperStatus.4 = INTEGER: up(1) IF-MIB::ifOperStatus.5 = INTEGER: up(1) IF-MIB::ifOperStatus.6 = INTEGER: down(2) IF-MIB::ifOperStatus.7 = INTEGER: down(2) IF-MIB::ifOperStatus.8 = INTEGER: up(1) IF-MIB::ifOperStatus.9 = INTEGER: up(1) IF-MIB::ifOperStatus.10 = INTEGER: up(1) IF-MIB::ifOperStatus.11 = INTEGER: up(1) IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00 IF-MIB::ifLastChange.2 = Timeticks: (2533) 0:00:25.33 IF-MIB::ifLastChange.3 = Timeticks: (2533) 0:00:25.33 IF-MIB::ifLastChange.4 = Timeticks: (2533) 0:00:25.33 IF-MIB::ifLastChange.5 = Timeticks: (1606126) 4:27:41.26 IF-MIB::ifLastChange.6 = Timeticks: (2853) 0:00:28.53 IF-MIB::ifLastChange.7 = Timeticks: (0) 0:00:00.00 IF-MIB::ifLastChange.8 = Timeticks: (1470) 0:00:14.70 IF-MIB::ifLastChange.9 = Timeticks: (3145) 0:00:31.45 IF-MIB::ifLastChange.10 = Timeticks: (3299) 0:00:32.99 IF-MIB::ifLastChange.11 = Timeticks: (7891) 0:01:18.91 IF-MIB::ifInOctets.1 = Counter32: 1129 IF-MIB::ifInOctets.2 = Counter32: 3889728 IF-MIB::ifInOctets.3 = Counter32: 3889728 IF-MIB::ifInOctets.4 = Counter32: 0 IF-MIB::ifInOctets.5 = Counter32: 2345547 IF-MIB::ifInOctets.6 = Counter32: 0 IF-MIB::ifInOctets.7 = Counter32: 0 IF-MIB::ifInOctets.8 = Counter32: 1858866 IF-MIB::ifInOctets.9 = Counter32: 3065206 IF-MIB::ifInOctets.10 = Counter32: 0 IF-MIB::ifInOctets.11 = Counter32: 2924661 IF-MIB::ifInUcastPkts.1 = Counter32: 10 IF-MIB::ifInUcastPkts.2 = Counter32: 0 IF-MIB::ifInUcastPkts.3 = Counter32: 0 IF-MIB::ifInUcastPkts.4 = Counter32: 0 IF-MIB::ifInUcastPkts.5 = Counter32: 20299 IF-MIB::ifInUcastPkts.6 = Counter32: 0 IF-MIB::ifInUcastPkts.7 = Counter32: 0 IF-MIB::ifInUcastPkts.8 = Counter32: 20302 IF-MIB::ifInUcastPkts.9 = Counter32: 15748 IF-MIB::ifInUcastPkts.10 = Counter32: 0 IF-MIB::ifInUcastPkts.11 = Counter32: 15365 IF-MIB::ifInNUcastPkts.1 = Counter32: 0 IF-MIB::ifInNUcastPkts.2 = Counter32: 0 IF-MIB::ifInNUcastPkts.3 = Counter32: 0 IF-MIB::ifInNUcastPkts.4 = Counter32: 0 IF-MIB::ifInNUcastPkts.5 = Counter32: 0 IF-MIB::ifInNUcastPkts.6 = Counter32: 0 IF-MIB::ifInNUcastPkts.7 = Counter32: 0 IF-MIB::ifInNUcastPkts.8 = Counter32: 0 IF-MIB::ifInNUcastPkts.9 = Counter32: 0 IF-MIB::ifInNUcastPkts.10 = Counter32: 0 IF-MIB::ifInNUcastPkts.11 = Counter32: 0 IF-MIB::ifInDiscards.1 = Counter32: 0 IF-MIB::ifInDiscards.2 = Counter32: 0 IF-MIB::ifInDiscards.3 = Counter32: 0 IF-MIB::ifInDiscards.4 = Counter32: 0 IF-MIB::ifInDiscards.5 = Counter32: 0 IF-MIB::ifInDiscards.6 = Counter32: 0 IF-MIB::ifInDiscards.7 = Counter32: 0 IF-MIB::ifInDiscards.8 = Counter32: 0 IF-MIB::ifInDiscards.9 = Counter32: 0 IF-MIB::ifInDiscards.10 = Counter32: 0 IF-MIB::ifInDiscards.11 = Counter32: 0 IF-MIB::ifInErrors.1 = Counter32: 0 IF-MIB::ifInErrors.2 = Counter32: 0 IF-MIB::ifInErrors.3 = Counter32: 0 IF-MIB::ifInErrors.4 = Counter32: 0 IF-MIB::ifInErrors.5 = Counter32: 0 IF-MIB::ifInErrors.6 = Counter32: 0 IF-MIB::ifInErrors.7 = Counter32: 0 IF-MIB::ifInErrors.8 = Counter32: 0 IF-MIB::ifInErrors.9 = Counter32: 0 IF-MIB::ifInErrors.10 = Counter32: 0 IF-MIB::ifInErrors.11 = Counter32: 0 IF-MIB::ifInUnknownProtos.1 = Counter32: 0 IF-MIB::ifInUnknownProtos.2 = Counter32: 0 IF-MIB::ifInUnknownProtos.3 = Counter32: 0 IF-MIB::ifInUnknownProtos.4 = Counter32: 0 IF-MIB::ifInUnknownProtos.5 = Counter32: 0 IF-MIB::ifInUnknownProtos.6 = Counter32: 0 IF-MIB::ifInUnknownProtos.7 = Counter32: 0 IF-MIB::ifInUnknownProtos.8 = Counter32: 0 IF-MIB::ifInUnknownProtos.9 = Counter32: 0 IF-MIB::ifInUnknownProtos.10 = Counter32: 0 IF-MIB::ifInUnknownProtos.11 = Counter32: 0 IF-MIB::ifOutOctets.1 = Counter32: 1129 IF-MIB::ifOutOctets.2 = Counter32: 2012400 IF-MIB::ifOutOctets.3 = Counter32: 2012400 IF-MIB::ifOutOctets.4 = Counter32: 0 IF-MIB::ifOutOctets.5 = Counter32: 3880897 IF-MIB::ifOutOctets.6 = Counter32: 0 IF-MIB::ifOutOctets.7 = Counter32: 0 IF-MIB::ifOutOctets.8 = Counter32: 3599395 IF-MIB::ifOutOctets.9 = Counter32: 1489817 IF-MIB::ifOutOctets.10 = Counter32: 129360 IF-MIB::ifOutOctets.11 = Counter32: 1079209 IF-MIB::ifOutUcastPkts.1 = Counter32: 10 IF-MIB::ifOutUcastPkts.2 = Counter32: 0 IF-MIB::ifOutUcastPkts.3 = Counter32: 0 IF-MIB::ifOutUcastPkts.4 = Counter32: 0 IF-MIB::ifOutUcastPkts.5 = Counter32: 19136 IF-MIB::ifOutUcastPkts.6 = Counter32: 0 IF-MIB::ifOutUcastPkts.7 = Counter32: 0 IF-MIB::ifOutUcastPkts.8 = Counter32: 19138 IF-MIB::ifOutUcastPkts.9 = Counter32: 12376 IF-MIB::ifOutUcastPkts.10 = Counter32: 1848 IF-MIB::ifOutUcastPkts.11 = Counter32: 11994 IF-MIB::ifOutNUcastPkts.1 = Counter32: 0 IF-MIB::ifOutNUcastPkts.2 = Counter32: 0 IF-MIB::ifOutNUcastPkts.3 = Counter32: 0 IF-MIB::ifOutNUcastPkts.4 = Counter32: 0 IF-MIB::ifOutNUcastPkts.5 = Counter32: 0 IF-MIB::ifOutNUcastPkts.6 = Counter32: 0 IF-MIB::ifOutNUcastPkts.7 = Counter32: 0 IF-MIB::ifOutNUcastPkts.8 = Counter32: 0 IF-MIB::ifOutNUcastPkts.9 = Counter32: 0 IF-MIB::ifOutNUcastPkts.10 = Counter32: 0 IF-MIB::ifOutNUcastPkts.11 = Counter32: 0 IF-MIB::ifOutDiscards.1 = Counter32: 0 IF-MIB::ifOutDiscards.2 = Counter32: 0 IF-MIB::ifOutDiscards.3 = Counter32: 0 IF-MIB::ifOutDiscards.4 = Counter32: 0 IF-MIB::ifOutDiscards.5 = Counter32: 0 IF-MIB::ifOutDiscards.6 = Counter32: 0 IF-MIB::ifOutDiscards.7 = Counter32: 0 IF-MIB::ifOutDiscards.8 = Counter32: 0 IF-MIB::ifOutDiscards.9 = Counter32: 0 IF-MIB::ifOutDiscards.10 = Counter32: 0 IF-MIB::ifOutDiscards.11 = Counter32: 0 IF-MIB::ifOutErrors.1 = Counter32: 0 IF-MIB::ifOutErrors.2 = Counter32: 0 IF-MIB::ifOutErrors.3 = Counter32: 0 IF-MIB::ifOutErrors.4 = Counter32: 0 IF-MIB::ifOutErrors.5 = Counter32: 0 IF-MIB::ifOutErrors.6 = Counter32: 0 IF-MIB::ifOutErrors.7 = Counter32: 0 IF-MIB::ifOutErrors.8 = Counter32: 0 IF-MIB::ifOutErrors.9 = Counter32: 0 IF-MIB::ifOutErrors.10 = Counter32: 0 IF-MIB::ifOutErrors.11 = Counter32: 0 IF-MIB::ifOutQLen.1 = Gauge32: 0 IF-MIB::ifOutQLen.2 = Gauge32: 0 IF-MIB::ifOutQLen.3 = Gauge32: 0 IF-MIB::ifOutQLen.4 = Gauge32: 0 IF-MIB::ifOutQLen.5 = Gauge32: 0 IF-MIB::ifOutQLen.6 = Gauge32: 0 IF-MIB::ifOutQLen.7 = Gauge32: 0 IF-MIB::ifOutQLen.8 = Gauge32: 0 IF-MIB::ifOutQLen.9 = Gauge32: 0 IF-MIB::ifOutQLen.10 = Gauge32: 0 IF-MIB::ifOutQLen.11 = Gauge32: 0 IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.2 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.3 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.4 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.5 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.6 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.7 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.8 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.9 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.10 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.11 = OID: SNMPv2-SMI::zeroDotZero IF-MIB::ifSpecific.11 = No more variables left in this MIB View (It is past the end of the MIB tree) Pero lo que me interesa, que es la IP externa del router, la que da el proveedor, no figura. Mira que son... son... lo que te imagines. Debe ser a propósito. :-(
Me has aclarado bastante. Me falta saber con que programa se capturan las traps que envíe el router. No puede ser una consola, no puedo tenerlo abierto todo el rato. Se trata de que el router envíe y el PC lo grabe en algún sitio, y cuando me apetezca lo miro. Debe ser un daemon.
En la página principal lo pone:
*** "A daemon application for receiving SNMP notifications (snmptrapd). Selected notifications can be logged (to syslog, the NT Event Log, or a plain text file), forwarded to another SNMP management system, or passed to an external application." ***
Pues no lo he visto, o me lo he saltado, o no he llegado.
http://www.net-snmp.org/docs/readmefiles.html http://www.net-snmp.org/docs/FAQ.html http://www.net-snmp.org/wiki/index.php/Main_Page
Te toca hacer los deberes... :-P
Ya, ya... Bueno, pues el programa "snmptrapd" lo tengo en el sistema, pero no hay nada en "/etc/init.d/" que lo cargue. Me toca hacerlo a mano. Bueno, arrancandolo a mano dice que no va a registrar nada de nada: Mar 11 13:54:08 nimrodel snmptrapd[3474]: netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 netsnmp_subtree_load() Mar 11 13:54:08 nimrodel syslog-ng[3792]: last message repeated 2 times Mar 11 13:54:08 nimrodel snmptrapd[3474]: Warning: no access control information configured. This receiver will *NOT* accept any incoming notifications. Mar 11 13:54:08 nimrodel snmptrapd[3475]: NET-SNMP version 5.4. O sea, que me toca configurarlo, y no hay un fichero snmptrapd.conf de ejemplo. Hay un manual, pero los manuales de esos son para los que ya saben hacerlo y necesitan sólo un recordatorio :-( [...] Vale, hay una wiki que dice algo, en <http://www.net-snmp.org/wiki/index.php/TUT:Configuring_snmptrapd>. Parece que es: authCommunity log,execute,net public He puesto esa linea y el daemon no protesta, veremos que dice el router. Si dice algo. Ah, el cortafuegos... FW_TRUSTED_NETS="192.168.1.1,udp,snmptrap" A esperar. - -- Saludos Carlos E.R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFH1oZitTMYHG2NR9URAjxSAJ9d+KYRXHabWVTLy5yfUWTGlz+bwACfTAz2 l+5e3xkkKbcycHqe1Sbsqrg= =SVmh -----END PGP SIGNATURE-----