Skip to content

VPN network routing Mikrotik

This is a bit rough and ready and may contain mistakes but should point you in the right direction. This is also not the only way it could be done and may not be the best

Add IP addresses you want to route via the VPN to an address list

/ip firewall address-list
add address= list=OutVpn

create a rule to mark packets from your address list for routing

/ip firewall mangle
chain=prerouting action=mark-routing new-routing-mark=VpnRoute passthrough=yes \
src-address-list=OutVpn log=no log-prefix="" dst-address=

NAT the traffic so that traffic tunnelling through the VPN appears to come from (the Hap IP)

/ip firewall nat
add action=src-nat chain=srcnat disabled=yes src-address-list=OutVpn to-addresses=\

Add a Route sending all marked packets/traffic via the VPN

/ip route
add check-gateway=ping distance=1 gateway=YourVpn routing-mark=VpnRoute

Want to make this site better? Open a PR or help fund hosting costs