SNMP Trap sender address

Is there a way to configure sender address to be lan-address when using openvpn? Currently snmptraps are sent from teltonika device(trb500) using ip-address of a vpn like 10.8.0.4(or what ever IP-is given from openvpn-server) instead of lan-address 192.168.2.1.

Hello,

Thank you for reaching out and for your inquiry.

Your request is currently under review and analysis. Once the evaluation is complete, I will get back to you with further information, findings, or suggestions.

Thank you for your patience in the meantime.

Best regards,

Hello,

Apologies for the delay in getting back to you.

I believe this might be achieved by adding a custom iptables postrouting rule. Could you try adding the following rule to your firewall via WebUI navigated to Network → Firewall → Custom Rules:

iptables -t nat -A POSTROUTING -o tun0 -p udp --dport 162 -j SNAT --to-source 192.168.2.1

Best regards,

Hi,

no that didn’t change anything. Still see trap sender as trb500 vpn address, not lan address. Btw. theres also other issue, might be related to same thing, when I have device connected to trb500 lan and it has IP from lan-range, also it’s IP get written over with but is added to trap’s designated field. Is this related to snmp-engine in trb500 and it’s configuration?

Hello,

Just to confirm, could you check what the actual openvpn interface name is (with ifconfig command)? Then edit the iptables -o <vpn_interface> option according to it.

Hi, yes, that was causing my problems.

1 Like