Re: problem using ports other than 161/162
Daniel Gibby <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Ah-ha! the problem wasn't that hard to solve once I started looking at the packets sent and received... I looked at them by putting dumpPacket true logTimestamp true into my /etc/snmp/snmp.conf file. The problem was that I hadn't setup the remote snmpd to accept snmp traffic with com2sec. I had only set it up to respond to traffic on its local network. Once I specified that my other network was allowed, I started seeing responses. So, here is my chronicle of what needed to be done to switch snmpd to use a port other than 161, to get around the ISP blocking of snmp traffic, also, here's how to get snmp to work over tcp: In my snmpd.conf, I needed to specify one of the following (depending on whether I want to use tcp or udp). Any port could have been used, my colocation ISP is blocking 161. agentaddress tcp:10161 agentaddress udp:10161 Then, to test with snmpwalk, I needed to do it like this: snmpwalk -Os -c public -v 1 tcp:MY_SNMPD_IP:10161 sysName That command worked either locally on the snmpd machine or remotely, but only after I put in this line in my snmpd.conf file: com2sec mynetwork MY_TESTING_IP public mynetwork was then setup as a group for v1, v2c and usm security models with ReadOnly privileges via the group and access directives. Now that I found the reason for the problem, I'm switching back to udp, and it works great. And by the way, I had misunderstood and snmptrapd is not necessary to run in my setting for what I'm currently looking for. snmptrapd is meant to receive SNMP TRAP and INFORM messages, which I don't need to just do passive queries of machines. Thanks, Daniel P.S. Did you like my keyword stuffing in this content to help people find it when they search for the things I searched for? Hopefully I mentioned agentaddress, ISP blocking port 161, snmpd, Net-SNMP, and blocked udp enough. ;) Daniel Gibby wrote: > Sorry, Ctrl+Enter along with being distracted sent the email before I > was finished... > > I was just wondering if anyone had seen a howto or site that > chronicled someone changing their SNMPd to run on ports other than > 161/162. > > I've found many people talk about their ISP blocking the ports, but > no-one saying "so here's how I changed my ports". > > I've tried searching for "agentaddress snmpTrapdAddr", which, I think, > would be things required to be on a page discussing changing ports, > but I only find 4 results, no-one has made a page it seems that shows > how this is done. I suspect if I ever get it working, this email list > will be searched by some future unfortunate soul and they'll be > grateful for any help you give. > > Thanks, > Daniel > > > Daniel Gibby wrote: >> Thanks for the tip, it does seem to do something, but times out and >> gives no response received... >> Maybe I'm not understanding what the snmptrap is for and the protocol >> isn't working correctly. >> >> I can telnet (I'm using tcp now, remember?) to port 10161 and port 10162 >> from either machine, but snmpwalk times out. >> >> What amazes me is how hard it has been finding any help or howtos or >> someone writing down on the Internet how they have done this in the past. >> I've tried dozens of searches, including things like >> >> Thanks, >> Daniel >> >> >> Dave Shield wrote: >> >>> 2008/9/4 Daniel Gibby <[email protected]>: >>> >>> >>>> I just changed the server to listen on tcp, how do I test it with >>>> snmpwalk via tcp? >>>> >>>> >>> snmpwalk ..... tcp:host:10161 >>> >>> Dave >>> >>> >> >> > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > Net-snmp-users mailing list > [email protected] > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users