Community discussions

MikroTik App
 
fredymartian
just joined
Topic Author
Posts: 6
Joined: Sun Sep 18, 2022 1:39 pm

send the whole traffic to with vpn

Sat Oct 01, 2022 10:53 pm

hello, I installed a CHR on VirtualBox, I connect to this CHR from my windows through an L2TP VPN, on this CHR I enabled DHCP and it gives me 192.168.1.38/24 then I set a masq rule so I have the internet on my windows too, now I have a SERVER which is located in Germany, I created a pptp VPN server on it and connect my CHR to SERVER with pptp,
what I want is all my windows traffic goes to CHR (which is already working fine) then all those traffic going to SERVER(germany) through my PPTP VPN and I reach the internet from there.
so windows -> l2tp -> CHR -> pptp -> SERVER -> Internet

should the DHCP client be enabled or not for my case?
also when its enabled as i say i got this IP : 192.168.1.38, then in routes i have this route : dst 0.0.0.0/0 GW: 192.168.1.1
so i would be happy if someone tell me how to send all my traffic to the SERVER and reach the internet

and this is my config
/interface pptp-client
add allow=mschap1,mschap2 connect-to=175.32.185.250 disabled=no name=pptp-out1 user=user1
/interface ethernet
set [ find default-name=ether1 ] disable-running-check=no name=ether1-INTERNET
set [ find default-name=ether2 ] disable-running-check=no
/disk
set sata1 disabled=no name=sata2
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=192.168.1.1-192.168.1.9,192.168.1.11-192.168.1.254
/ppp profile
add local-address=10.10.10.1 name="l2tp profile" remote-address=10.10.10.2 use-encryption=yes
/interface l2tp-server server
set enabled=yes use-ipsec=yes
/ip dhcp-client
add interface=ether1-INTERNET
/ip firewall address-list
add list=external-ip
/ip firewall nat
add action=masquerade chain=srcnat
/ppp secret
add name=user1 profile="l2tp profile" service=l2tp
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1118
Joined: Tue Jun 23, 2015 2:35 pm

Re: send the whole traffic to with vpn

Sun Oct 02, 2022 6:44 am

i think you can't because your device is vpn server(that is my theory, i haven't try yet)

In practica, is pretty easy, if 10.10.10.2 has lower distance than ther1-INTERNET, everything will go through the vpn.

Who is online

Users browsing this forum: krisaac and 9 guests