I’ve set up a hAP lite as a L2TP VPN client and I can see it’s connected to the VPN server. The VPN server address is 192.168.42.1 and the hAP has 192.168.42.10.
My laptop connected to the hAP via wifi has an ip address of 192.168.88.254 and a gateway of 192.168.88.1 (the hAP).
I can access the internet from my laptop but when I check the external IP address, it shows as my home connection and not the ip address of the VPN server.
I can ping 192.168.88.1 and 192.168.42.10 from the laptop but I can’t ping 192.168.42.1.
If I tick the “Add Default Route” option in the L2TP client config then I can no longer access the internet. I also can not ping 192.168.42.1 still.
I’m sure i’m probably missing some firewall rules or a static route but i’m a Mikrotik newbie so I have no idea!
It might be how you have srcnat set up and/or whether the server at the other side knows how to route back to your lan IP (192.168.88.254)
If the packets from your local lan (192.168.88.254) are only natted when they leave your router for the internet (0.0.0.0/0 or it’s interface) then your lan IP will remain the same when it arrives at the Server network (192.168.42/24).
The server may not know to route 192.168.88.0/24 addresses back via 192.168.42.10, hence no ping reply.
If your wanting to have all your internet traffic routed via the VPN then you’ll need to add routing marks to traffic that you intend to go via the VPN and add the 0.0.0.0/0 dst route via the VPN there specifying the routing marks
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
I’ve tried the rules you suggested and had a little play but I still can’t get anything flowing down the VPN. I have checked the server firewall and it is all fine. I can connect to the VPN from my Mac and it all routes fine so there must be something I am missing on the hAP.
Any other suggestions? Is there a log I can view to see where things are going wrong?
I had to remove the default “Fasttrack Connection” rule from the firewall. Everything else was left as default. Once the VPN connection was set up, these are the rules I added:
My next problem is that I want to be able to access the admin interface of the router from another client on the VPN.
So far, I have both connected up to the VPN (PC - 192.168.42.10 and Mikrotik - 192.168.42.11) but I can’t access the web interface of the Mikrotik at 192.168.42.11 from the PC.
I’m guessing it’s got to be a firewall rule somewhere but I can’t work it out.
I’ve checked the VPN server firewall and that is allowing client to client routing and I can ping the PC at 192.168.42.10 from the Mikrotik but I can’t ping the Mikrotik at 192.168.42.11 from the PC.