Community discussions

MikroTik App
 
zimage
newbie
Topic Author
Posts: 26
Joined: Wed Jul 10, 2013 9:48 pm

Src-Natting Router's SNMP Traps

Thu Nov 07, 2013 6:28 pm

I'd like the SNMP traps from my mikrotik router to be natted to its lookback address. I added the following nat rule.
/ip firewall nat
add action=src-nat chain=srcnat dst-address=10.24.0.8 dst-port=162 protocol=udp to-addresses=10.0.0.10
This unfortunately also seems to also catch any SNMP traps that are forwarded through the router. How can I match only locally originated traffic?
 
zimage
newbie
Topic Author
Posts: 26
Joined: Wed Jul 10, 2013 9:48 pm

Re: Src-Natting Router's SNMP Traps

Thu Nov 07, 2013 7:45 pm

Got it.
/ip firewall mangle
add action=mark-packet chain=output dst-port=162 new-packet-mark=local-snmp-trap protocol=udp
/ip firewall nat
add action=src-nat chain=srcnat packet-mark=local-snmp-trap to-addresses=10.0.0.10

Who is online

Users browsing this forum: Bing [Bot] and 41 guests