I have a CCR1036-8G-2S+ with RouterOS 6.49.7. This router have OpenVPN client connected to the server and IPIP tunnel to some other host in OpenVPN network:
[admin@router] > /interface ipip print detail
Flags: X - disabled, R - running, D - dynamic
0 name="ipip-test" mtu=auto actual-mtu=1352 local-address=10.254.0.46 remote-address=10.254.0.47 keepalive=2s,10 dscp=inherit
clamp-tcp-mss=yes dont-fragment=no allow-fast-path=yes
[admin@router] > /ip address print
Flags: X - disabled, I - invalid, D - dynamic
# ADDRESS NETWORK INTERFACE
...
9 71.40.244.50/29 71.40.244.48 sfp-sfpplus1
10 10.16.0.2/30 10.16.0.0 ipip-test
11 D 10.254.0.46/24 10.254.0.0 ovpn-client
However when I try to send something to the host in IPIP tunnel, encapsulated IPIP package it get source address 71.40.244.50 (from sfp-sfpplus1 interface).
[admin@router] > /tool sniffer quick interface=ovpn-client ip-protocol=!tcp
INTERFACE TIME NUM DIR SRC-MAC DST-MAC VLAN SRC-ADDRESS DST-ADDRESS PROTOCOL SIZE CPU FP
ovpn-client 0.567 1 -> 71.40.244.50 10.254.0.47 ip:ipencap 40 2 no
ovpn-client 0.573 2 -> 10.254.0.46 10.254.0.47 ip:icmp 56 7 no
ovpn-client 0.824 3 <- 10.254.0.47 10.254.0.46 ip:icmp 56 4 no
ovpn-client 1.085 4 <- 10.254.0.47 10.254.0.46 ip:ipencap 105 4 no
ovpn-client 1.576 5 -> 10.254.0.46 10.254.0.47 ip:icmp 56 7 no
ovpn-client 1.868 6 <- 10.254.0.47 10.254.0.46 ip:icmp 56 4 no
It is pretty unexpected for me. Issue is connected only with packages sent by IPIP tunnel itself, other processes on RouterOS (ssh server, /ping program) set correct source address to the packages. Only think I can imagine is wired mangle or nat rules but I do not see anything suspicious here.
Where can I start to find out why RouterOS set this IP address to the packages?