Skip to content

Instantly share code, notes, and snippets.

@Mikulas
Created May 18, 2016 06:57
Show Gist options
  • Save Mikulas/3be79f11e34a4641cdb39ed5c230e912 to your computer and use it in GitHub Desktop.
Save Mikulas/3be79f11e34a4641cdb39ed5c230e912 to your computer and use it in GitHub Desktop.

This is for Posterity: Googling issues with Apple iOS 9 Mikrotik and L2TP VPN lead me to this Post. I had many troubles and finally got it to work. I will post my commands below to hopefully save others some headache. :D

this assumes some default configuration on the router: local subnet 192.168.1.0/24 router address 192.168.1.1 dhcp pool 192.168.1.100 - 192.168.1.200

/interface l2tp-server server
set default-profile=l2tp-profile enabled=yes ipsec-secret=MyIpsecSecret use-ipsec=yes
/ppp profile
add change-tcp-mss=yes dns-server=8.8.8.8,8.8.4.4 local-address=192.168.1.1 name=l2tp-profile \
    remote-address=dhcp use-encryption=yes
/ppp secret
add local-address=192.168.1.201 name=myPppUser password=myPppPassword profile=default-encryption remote-address=\
    192.168.1.202 service=l2tp
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=md5,sha1,sha256,sha512 enc-algorithms=\
    aes-128-cbc,aes-256-cbc,aes-128-ctr,aes-256-ctr lifetime=8h pfs-group=none
/ip ipsec peer
add dpd-interval=2s enc-algorithm=aes-128,aes-256 exchange-mode=main-l2tp generate-policy=port-override \
    secret=MyIpsecSecret
/interface ethernet set 0 arp=proxy-arp
/interface bridge set 0 arp=proxy-arp

These commands should be all that is needed for a successful connection with an iOS device running 9.2+, and a Mac running 10.10+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment