R
R
RZYR2022-03-17 13:49:14
VPN
RZYR, 2022-03-17 13:49:14

mikrotik routeros 7.1.3. How to redirect traffic correctly?

mikrotik routeros 7.1.3. There is a VPN client on it, it works.
It is necessary to redirect traffic (all/partially) from the local subnet/specific local IPs to the VPN.
As far as I know, it is possible to do this without Mangle.
In Router OS v7, route is implemented a little differently than v6.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AlexVWill, 2022-03-17
@AlexVWill

Write the rule in Mangle

spoiler
6233198e11fcd869503442.png
623319c7cb5fd015847569.png

R
RZYR, 2022-03-17
@RZYR

This can be done without Mangle.
Here is a variant of my solution. It seems to work

/ip firewall nat
add action=masquerade chain=srcnat ipsec-policy=out,none out-interface=vpn-interface

/routing table
add disabled=no fib name=traf-vpn
/routing rule
add action=lookup disabled=no src-address=192.168.1.10/32 table=traf-vpn #192.168.1.10/32 - локальный ip, можно наверное и подсесть указать


/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.0.0.1 pref-src=0.0.0.0 routing-table=traf-vpn scope=30 suppress-hw-offload=no target-scope=10 #10.0.0.1 - vpn gateway

PS Unfortunately, the problem with this solution is that after rebooting the device 192.168.1.10 it is not assigned an ip address

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question