0

I want to redirect SNMP traps.

Let's say, receive an SNMP trap on UDP port 162, and redirect the package to ports 10162 and 20162 (both of them). How can I achieve this using iptables?

I can successfully redirect the package to port 10162 using:

iptables -t nat -A PREROUTING -i eth0 -p udp --dport 162 -j REDIRECT --to-port 10162

Is it possible to redirect the package to two ports?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.