How to access VPN(172.16.0.0/24) users to LAN(192.168.0.0/16), when mikrotik(192.168.122.2) is not default gateway for LAN computers?
I tried “route add 172.16.0.0 mask 255.255.255.0 192.168.122.2 metric 1” for LAN. But no pings..
Your LAN users are connected directly to your gateway?
Your VPN are connected to your mikrotik?
And you also have your mikrotik connected to your gateway through another network?
The LAN needs a route to 172.16.0.0/24 that points to the Mikrotik’s lan IP. (make sure the Mikrotik’s LAN ip is static).
You put it:
-
in the LAN’s default GW router - this will cause that router to forward packets correctly, and it will also send ICMP redirects to the LAN clients who will temporarily update their forwarding behavior to go directly to the Mikrotik
-
in each and every LAN client that you need to have communication with across the VPN. (very very unmanageable solution, and This should only be done if you can’t do #1)
A 3rd option is to use NAT on the Mikrotik - src-nat traffic from the VPN to appear as the Mikrotik’s LAN IP address.
This will allow far side of VPN to reach the LAN. If you need the LAN hosts to be able to go out across the VPN as well, then only options 1 and 2 above will work.
It appears that the “route add” command is option 2.
If the far side of the VPN is similar to this LAN - if there is a Mikrotik that is not the default gw for 172.16.0.0/24, then you will need to do the same thing on the other end of the VPN.