Guys, I need a case for forwarding all traffic from one device via my vpn (l2tp) tunnel.
I’ve the next:
VPS with L2TP server - 10.0.0.1
Mikrotik with L2TP client - 10.0.0.2 (192.168.0.1)
Routes into vps and vice versa
What I need:
Redirect one (or maybe several in the future) device from my local network through an existing VPN route, so that this device can access the Internet ONLY via VPN. Current IP address of this device is 192.168.0.222
PS I tried different options proposed here on the forum, where the type of VPN and the task were similar, but I don’t understand what else is necessary in my case, since the options indicated here did not solve the problem for me.
I began to understand in more detail, and tried to do the following…
I have two external Mikrotiks, which are also connected to me via l2tp, and they see each other through my Mikrotik using masquerading: network xxx.xxx.1.0 sees network xxx.xxx.2.0 through me and vice versa.
I tried to add prerouting in Mangle for my device 0.222 with the marking test and added a route where I specified the network gateway 1.0 (I also tried 2.0) and with the marking test - everything works, my device from my network with address 0.222 accesses the Internet via Mikrotik 1.0 or 2.0 WANs.
But with my VPS the Internet is falling off. I think the issue is on the side of the VPS and the correct routing rules. I’m still digging in this direction.