Created
January 23, 2014 16:25
-
-
Save tiernano/8581643 to your computer and use it in GitHub Desktop.
MikroTik Router VPN Stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/interface l2tp-client add name="vpn" max-mtu=1460 max-mru=1460 mrru=disabled connect-to=servername user="username" password="password" profile=default-encryption add-default-route=no dial-on-demand=no allow=pap,chap,mschap1,mschap2 | |
/interface l2tp-client enable [/interface l2tp-client find name ="vpn"] | |
/ip firewall mangle add chain=prerouting action=mark-routing new-routing-mark=vpn passthrough=yes src-address=networkaddress/24 dst-address=!networkaddress/24 | |
/ip route add dst-address=0.0.0.0/0 gateway=vpn gateway-status=vpn distance=1 scope=30 target-scope=10 routing-mark=vpn | |
/ip firewall nat add chain=srcnat action=masquerade out-interface=vpn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment