Port replication/forwarding in RHEL
I have a SNMP Network element which send a trap to the standard port 162 in the RHEL machine.Only one trap handler can bind to this 162 port at a time.
I want to forward/copy this trap from 162 to multiple ports like port1,port2,etc besides the port 162 so that I can have multiple trap handlers in my machine each independenly listening to its assigned port.All these ports are in the same machine.
(ie,duplicate the trap in multiple ports for my applications to listen ).
Redirect using iptables only forwards trap from 162 to any one port we configure.Also this alows to listen only on the forwarded port and not on 162.
Any ways of achieving this??.