A
A
Alexander Novikov2018-10-13 14:39:50
VPN
Alexander Novikov, 2018-10-13 14:39:50

Mikrotik VPN only for certain IP addresses?

Good afternoon people, tell me.
We have a Mikrotik connected to an existing network with DHCP, a DHCP Client is configured, we get an IP and we are on the Internet.
VPN connection is configured on Mikrotik (to a remote office). Connected does not work, we see the network from a remote office and vice versa. But the problem is that all clients connected to Mikrotik ports (and wifi clients too) start going to the Internet by default through a remote VPN server. And we don’t need this, we only need a couple of IP addresses. These IP addresses can be allocated to a separate physical port of Mikrotik.
Please advise on setting. How to set up routing so that only certain IP or ports go through VPN, and all the rest go directly to the Internet. Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2018-10-13
@dimonchik2013

www.decker.su/2015/10/vpn-mikrotik-pbr-setup.html

S
Sergey, 2018-10-14
@LiS-31

If I understand you correctly, you have 2 routes on Mikrotik: to the Internet and to a private network through VPN.
If the task is to give parallel access to both routes, but to have local Internet access, then everything is simple. You need to add a route:
where dst-address=0.0.0.0/0 is your local VPN subnet and gateway="hideme-vpn" is the VPN connection.
If you want all traffic from one ip to go through VPN, then you need a route:

/ip route add src-address=0.0.0.0/0 gateway="hideme-vpn"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question