I have a mikrotik router at home and my PC is connected to it and i also rented a VPS with mikrotik installed on in for the purpose of routing my internet connection through a VPN server running on the VPS i rented. But my PC fails to connect to the L2TP vpn server that i set up on the VPS that i rent, i suspect that this is due to my country blocking the VPN protocols. But what i managed to do is create a L2TP vpn server on my mikrotik router and have the rented server connect as client to my Ĺ2TP vpn server running on my mikrotik router in my home. Is there a way to get my PC to route its internet connection via this VPN connection where the remote server is the client and my router is the server so that internet requests from my PC go through this VPN and exit into the internet at the remote server? And if there is a way to do so, how do i do it?
Hi
Yes, you certainly can, and there are many ways to do so.
Due to lack of info provided, I can give you a very brief example of one of many ways of doing so:
/ip firewall mangle
add action=route chain=prerouting passthrough=no src-address=%your_PC_address% route-dst=%your_VPS_address%
You might want to add some exceptions to this rule, such as dst-address-type=!local not to lock yourself out of your router.
Also, keep in mind that your VPS should have a reverse route towards your PC’s subnet, or, alternatively, src_nat this connection with your router’s IP.