Whole subnet automatically on VPN

Hi everyone

I have a PPTP client on a RB, what I want to achieve is have every device which connects to eth2(DHCP Server running on this interfacing giving ips in 10.0.0.x range), be connected to the VPN.

This way each device doesn’t have to dial into the VPN.

I know this probably some real simply routes that have ti be added or something, but cant seem to figure it out.

Thanks in advance

How about bridging eth2 with the VPN? I have a few previous posts explaining how to do it.

Ok great, I did not think it would be that simple. I thought there would have to be some type of routing involved. Appreciate the assistance

So I have been trying to get this working, but with no luck.

I understand I can use EOIP, but my problem is that I am using Pfsense as a VPN server and a Mikrotik as a PPTP client. I cannot figure out how to set up the EOIP between Pfsense and Mikrotik.

Anyone got any suggestions?

Regards

You should be able to just route whatever you want out your pptp connection, something like this:

ip firewall mangle add action=mark-routing chain=prerouting new-routing-mark=use-vpn src-address=10.0.0.0/8

ip route add distance=1 gateway=pptp-server routing-mark=use-vpn

Your pptp server will either need a route back to the subnet you’re sending to it, or you’ll need to masquerade that subnet with the pptp interface’s IP.

Thanks, so my DHCP server which is running on the same box as the VPN server, will then pass IP’s out to all interfaces which are bridged with the PPTP client on the RB?


No, this config is for doing it in a routed manner. Your 'tiks DHCP server will do its usual thing, using local IP addresses, and the magling and routing will select and send the traffic you want over the VPN. I’m not sure that you can bridge over PPTP like that.