Monday, 27 April 2015

CentOS 6.6: redirecting SNMP traps from low ports to high ports with iptables

I have a Java application that processes SNMP traps. Traps arrive on port 162. Normally Java cannot listen on the low ports. You can use setcap to permit it or run as root but these introduce potential security issues.

I opted to have the Java process listen on port 1162. Changes will have to be performed as root.