I am still new to RouterOS, today I try to setup a PPTP client on the CCR1009 which connect to office vpn server, I want only specific IP go through the PPTP connection only. The CCR1009 ip range is 192.168.11.0/24, office’s vpn server give out 192.168.10.2 to the CCR1009’s PPTP client, and the office router IP is 192.168.1.1
I setup a mangle rule as follow:
/ip firewall mangle add action=mark-routing chain=prerouting dst-address=192.168.1.112 new-routing-mark=VPN_mark passthrough=no
and route:
/ip route add distance=1 dst-address=0.0.0.0/0 gateway=Office_VPN routing-mark=VPN_mark
and nat rules:
add action=masquerade chain=srcnat comment=“VPN NAT” out-interface=Office_VPN
I can ping the 192.168.1.1 but cannot ping or connect to the 192.168.1.112
but if I use a static route I can ping the 192.168.1.112:
/ip route add distance=1 dst-address=192.168.1.0/24 gateway=JAhome_VPN
Figure out I had rp_filter set to strict so it won’t work, if I set rp_filter to loose then it will work correctly, but I had no idea why rp_filter=strict will work for static route but not policy routing.