How to preserve SNMP trap IP address and host name when forwarding

2019-04-10 Thread 700 grm
Hi,

I need help, with preserving SNMP trap IP address and hostname when
forwarding SNMP traps through snmptrapd

I got 10 servers behind a firewall and router, I have setup SNMP trap
forwarding and GET based on community string however,
snmptrapd rewrites trap headers, IPs and host name with SNMP Proxy server
information
[image: image.png]
snmptrapd.conf  only configuration that was added
/etc/snmp/snmptrapd.conf
  authCommunity   net public
  forward  default  10.12.4.192 public


I was expecting to get trap with SRV1 information:

2019-04-10 08:52:46 SRV1.localhost  [UDP: [192.168.0.20:36670
->[X.X.X.X]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (14866232) 1 day,
17:17:42.32  SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::sysName
 SNMPv2-MIB::sysName.0 = STRING: test trap from xxx

However, I am getting:

2019-04-10 08:52:46 snmp-proxy.localhost  [UDP: [192.168.0.10:36670
->[X.X.X.X]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (14866232) 1 day,
17:17:42.32  SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::sysName
 SNMPv2-MIB::sysName.0 = STRING: test trap from xxx

I will appreciate any help

Thx and regards

700grm
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How to preserve SNMP trap IP address and host name when forwarding

2019-04-12 Thread Pik Master via Net-snmp-users


>I need help, with preserving SNMP trap IP address and hostname when forwarding 
>SNMP traps through snmptrapd
>I got 10 servers behind a firewall and router, I have setup SNMP trap 
>forwarding and GET based on community string however, snmptrapd rewrites trap 
>headers, IPs and host name with SNMP Proxy server information

Hi

I got exactly the same problem and wrote a patch. You will need to recompile 
net-snmp from sources though.
Patches and instructions here - https://sourceforge.net/p/net-snmp/patches/1320/
They are for net-snmp-5.7.3, I didn't have a chance to test them on 5.8 yet.

Pik Master

PS. sorry if you received this reply multiple times, the account I replied from 
has its email hosting provider blocked for sending spam.






___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: How to preserve SNMP trap IP address and host name when forwarding

2019-04-10 Thread Kaleemulla Sharief (kasharie) via Net-snmp-users
If this is specific to only 10 servers, you could configure NAT on snmp proxy 
for these 10 servers to do address spoofing?

Sent from my iPad

On 10-Apr-2019, at 8:59 PM, 700 grm <700...@gmail.com> wrote:

Hi, 

I need help, with preserving SNMP trap IP address and hostname when forwarding 
SNMP traps through snmptrapd

I got 10 servers behind a firewall and router, I have setup SNMP trap 
forwarding and GET based on community string however, snmptrapd rewrites trap 
headers, IPs and host name with SNMP Proxy server information

snmptrapd.conf  only configuration that was added
/etc/snmp/snmptrapd.conf
  authCommunity   net public
  forward  default  10.12.4.192 public
 

I was expecting to get trap with SRV1 information:

2019-04-10 08:52:46 SRV1.localhost  [UDP: [192.168.0.20:36670->[X.X.X.X]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (14866232) 1 day, 17:17:42.32  
SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::sysName   SNMPv2-MIB::sysName.0 = 
STRING: test trap from xxx

However, I am getting:

2019-04-10 08:52:46 snmp-proxy.localhost  [UDP: 
[192.168.0.10:36670->[X.X.X.X]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (14866232) 1 day, 17:17:42.32  
SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::sysName   SNMPv2-MIB::sysName.0 = 
STRING: test trap from xxx

I will appreciate any help

Thx and regards

700grm
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: How to preserve SNMP trap IP address and host name when forwarding

2019-04-12 Thread Pik Master
Hi   I got exactly the same problem and wrote a patch. You will need to 
recompile net-snmp from sources though.  Patches and instructions here -  
sourceforge.net sourceforge.net  They are for net-snmp-5.7.3, I didn't have 
a chance to test them on 5.8 yet.   Pik Master





Dnia 10 kwietnia 2019 17:30 Kaleemulla Sharief \(kasharie\) via 
Net-snmp-users  wrote:

 Hi,

 I need help, with preserving SNMP trap IP address and hostname when forwarding 
SNMP traps through snmptrapd

 I got 10 servers behind a firewall and router, I have setup SNMP trap 
forwarding and GET based on community string however, snmptrapd rewrites trap 
headers, IPs and host name with SNMP Proxy server information
 
 snmptrapd.conf  only configuration that was added
 /etc/snmp/snmptrapd.conf
  authCommunity   net public
  forward  default  10.12.4.192 public
     

 I was expecting to get trap with SRV1 information:

 2019-04-10 08:52:46 SRV1.localhost  [UDP: [192.168.0.20:36670->[X.X.X.X]
 DISMAN-EVENT-MIB::sysUpTimeIns = Timeticks: (14866232) 1 day, 17:17:42.32  
SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::sysName   SNMPv2-MIB::sysName.0 = 
STRING: test trap from xxx

 However, I am getting:

 2019-04-10 08:52:46 snmp-proxy.localhost  [UDP: 
[192.168.0.10:36670->[X.X.X.X]
 DISMAN-EVENT-MIB::sysUpTimeIns = Timeticks: (14866232) 1 day, 17:17:42.32  
SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::sysName   SNMPv2-MIB::sysName.0 = 
STRING: test trap from xxx

 I will appreciate any help

 Thx and regards

 700grm
 __
 Net-snmp-users mailing list
  Net-snmp-users@lists.sourcefor
 Please see the following page to unsubscribe or change other options:
 lists.sourceforge.net lists.sourceforge.net
 __
 Net-snmp-users mailing list
  Net-snmp-users@lists.sourcefor
 Please see the following page to unsubscribe or change other options:
 lists.sourceforge.net lists.sourceforge.net
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users