I setup a L2TP VPN on a mikrotik LTE device to access my office router Lan.
The tunnel is established and I can ping both sides of the tunnel and reach the office router via the LTE device.
I want to be able to use the office connection as the main internet connect for the mikrotik LTE device, send all traffic from the LTE down the tunnel to the office connection.
LTE Config
Local Network = 192.168.1.0/24
/ip firewall filter
add action=accept chain=input comment=“allow L2TP VPN (ipsec-esp)” protocol=ipsec-esp
add action=accept chain=input comment=“allow L2TP VPN (500,4500,1701/udp)” dst-port=500,1701,4500 protocol=udp
add action=accept chain=forward comment=“defconf: accept established,related” connection-state=established,related
add action=drop chain=forward comment=“defconf: drop invalid” connection-state=invalid
/ip route
add distance=1 dst-address=0.0.0.0/0 gateway=lte1
add distance=1 dst-address=0.0.0.0/0 gateway=l2tp-out1 routing-mark= PPTP
add distance=1 dst-address=172.168.1.1 gateway=l2tp-out1 routing-mark= PPTP
/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=PPTP passthrough=yes src-address=192.168.1.0/24
/ip firewall nat
add action=masquerade chain=srcnat out-interface=lte1
add action=masquerade chain=srcnat disabled=yes out-interface=l2tp-out1
/ip dns
set allow-remote-requests=yes
Office Mikrotik Router
Local Network = 192.168.0.0/24
/ip firewall filter
add action=accept chain=input comment=“allow L2TP VPN (ipsec-esp)” protocol=ipsec-esp
add action=accept chain=input comment=“allow L2TP VPN (500,4500,1701/udp)” dst-port=500,1701,4500 protocol=udp
add action=accept chain=forward comment=“defconf: accept established,related” connection-state=established,related
add action=drop chain=forward comment=“defconf: drop invalid” connection-state=invalid
/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN
add action=masquerade chain=srcnat src-address=172.168.1.0/24
/interface l2tp-server server
set default-profile=default enabled=yes keepalive-timeout=60 max-mru=1460 max-mtu=1460
/interface pptp-server server
set authentication=pap,chap,mschap1,mschap2 default-profile=default enabled=yes
/interface l2tp-server
add name=l2tp-in1 user=test
/ppp secret
add name=test password=1234 service=l2tp
/ppp profile
set *0 change-tcp-mss=default local-address=172.168.1.1 remote-address=vpn-l2tp
set *FFFFFFFE use-encryption=required
/ip pool
add name=vpn ranges=172.168.1.10-172.168.1.254
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=8.8.8.8 name=dns1
add address=8.8.4.4 name=dns2
/ip route
add comment=“WAN” dst-address=0.0.0.0/0 distance=1 gateway=WAN
add distance=1 dst-address=192.168.0.0/24 gateway=WAN Pref.Source 192.168.0.129 <<< Local IP of Office router is behind main ISP router, ports are opened to allow vpn on ISP router
add distance=1 dst-address=172.168.1.251 gateway=l2tp-in1 Pref.Source 172.168.1.1 <<< This route is not a static 172.168.1.251 is remote LTE router
Routing-mark on LTE device
LTE routing mark is PPTP
Routing-mark on Office,
Office routing mark is VpnRoute
Troubleshooting
I have no internet on LTE device when mangle rule is enabled.
I can see DNS populating on the LTE device when trying to access a website.