1

I have a following problem that I can't find a solution for.

I have the following setup

Private LAN -> Mikrotik router <-> ip2lt vpn on linux <-> clients

The idea is to allow clients to remotely access private LAN network that is connected to Mikrotik router. I have been able to configure the vpn so that the clients see each other and the Mikrotik router, but I can't figure out how to connect private LAN network that is connected to the Mikrotik with other VPN clients.

Let's assume that clients and the router are connected together into one network 192.168.42.0/24 via VPN.

Mikrotik has 192.168.42.10 Client 1 has 192.168.42.11

Client 1 pings 192.168.42.10 --> works well.

Now, Mikrotik has a private network connected with the addresses 192.168.88.0/24

I want to be able to connect to 192.168.88.254 from Client 1.

Questions:

1) How do I do this? I figured that VPN needs to forward the ip packets addressed to 192.168.88.0/24 to the Mikrotik router cause right now they don't reach Mikrotik. How to achieve this on linux? Iptables FORWARD or adding a route rule?

2) Let's say I have a default gateway on the client's computer 192.168.1.1 (NAT for internet access), when I traceroute to 192.168.88.254 I see it goes through the default gateway. I want it to go through VPN server instead. How to properly address this? I added a local routing rule on my Mac but this solution (to modify client in order for it to work) doesn't seem to be right.

4) Do I have to configure something in Mikrotik router? In my opinion no because it will know the gateway for 192.168.42.0/24 addresses, right?

5) What is the best way/practice to achieve the desired outcome?

1

If the client has IP 192.168.42.11/24 but default GW 192.168.1.1 that's not going to work as any device you are routing trough needs to be on the same network so.

I'm assuming that microtik is the default GW so you need to use 192.168.42.10. also, microtik needs to know how to get to 192.168.88.0/24 which I guess it knows as it must have an interface on that network

I guess that you need to check the routing table on microtik and also its IP address

  • 1
    The client has different interfaces one of them is VPN ppp for the network 192.168.42.0 and the other one is eth0 for 192.168.1.0 for internet access. – Adam Wolski May 12 at 8:48
  • But note that mikrotik can't be the default gateway since VPN is in between? Mikrotik knows how to get to 192.168.88.0/24 since this network is connected to it with bridge interface – Adam Wolski May 12 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.