iptables: redirecting inbound UDP to a different port, and response going out the "public" port
I have an SNMP agent listening on a high-level port (16161) and I want to redirect traffic from the standard SNMP agent port 161. Easy iptables rule: iptables -t nat -A PREROUTING -p udp --dport 161 -j REDIRECT --to-ports 16161 However responses appear to come from port 16161 and are dropped by linux clients. I want to change the response's source port to 16