Hi All,
I need to receive incoming SNMPv2 traps/informs not only on the default port 162 but also on the other ports (e.g. 362, 363, etc). I know that I can specify a custom port using the trapPort attribute (in the DataMiner.xml), but is it possible to configure several ports (more than 3) to receive SNMPv2 traps/informs?
Thank you for your help!
Per SNMP version you can configure only 1 port at the moment. You could however setup a small proxy that forwards all traffic from certain ports to another port. Netsh interface portproxy would be the native solution that is embedded into Windows but only supports TCP at the moment.
There are many 3rd party solutions out there that do exactly that but also for UDP. One of those that I have experience with is socat (which is a tool developed for Unix but also has a Windows port).
By setting up following command:
socat udp-recvfrom:363,fork udp-sendto:0.0.0.0:162
You will forward all UDP traffic destined for port 363 to port 162 which DataMiner will pick up then. As it's a proxy, the downside is that you'll lose the source IP information of the datagram and it will seem that it's coming from the loopback address. If that's not an issue, above described solution might be sufficient for you.
Other 3rd party tools that I've found but have not played around with are: