Results 1 to 1 of 1
We are using Net-SNMP 18.104.22.168 and I have setup a "gateway" to run snmptrapd and forward all traps it receives from internal entities to an external managing entity. Everything is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-08-2010 #1
- Join Date
- Jan 2010
Changing the agent-address for SNMP v1 pdus
We are using Net-SNMP 22.214.171.124 and I have setup a "gateway" to run snmptrapd and forward all traps it receives from internal entities to an external managing entity. Everything is working fine except that for SNMP Version 1 traps, the source/host address is displaying as an internal address (it appears to be using the agent-addr field from the SNMP v1 pdu) and not the external address of the "gateway" that initiates the fowarding. For SNMP Version 2 traps/informs, there is no agent-addr field since the pdu has been modified and the traps are being displayed correctly using the external address of the gateway presumably being retrieved from the source field of the IP header.
So I'm wondering how can I have snmptrapd modify the agent-addr field for SNMP Version 1 traps before they get forwarded? I noticed that snmptrapd supports the ability to execute a program when it receives a trap using the traphandle directive. From the best I can gather, I would have to capture all traps and reissue them with the correct agent address for SNMP version 1 traps (I haven't tried this yet, but I'm about to run some tests)? Is there a better way to accomplish the same thing? Is there a way to just modify the agent-addr field for SNMP version 1 traps?