l2tp vpn
Posted: Fri Sep 15, 2017 1:56 pm
Trying to configure an ipsec/l2tp vpn on a hap-ac, to use it with a apple computer (road warrior) (or an android phone).
Saw some examples:
- https://wiki.mikrotik.com/wiki/Manual:Interface/L2TP
- https://youtu.be/vPxGIz0_Pnw
- viewtopic.php?f=13&t=124618&hilit=l2tp+vpn
- viewtopic.php?f=9&t=123532&p=607963&hil ... pn#p607963
But with all implementations I saw, I don't see them as complete configurations
- shouldn't I need some kind of nat?
- definitively I need firewall rules I also noticed I have some default ipsec rules. do they relate?
[OSX: public IP] <-----> [HAP-AC: dhcp assigned ip(with no-ip service)] <-----> [internal Network: 10.10.10.0/24, GW:10.10.10.1]
So I ended with this
I would like to implement a route on the client to force traffic to 10.10.10* go thru the tunnel.
again any insight is welcome
Saw some examples:
- https://wiki.mikrotik.com/wiki/Manual:Interface/L2TP
- https://youtu.be/vPxGIz0_Pnw
- viewtopic.php?f=13&t=124618&hilit=l2tp+vpn
- viewtopic.php?f=9&t=123532&p=607963&hil ... pn#p607963
But with all implementations I saw, I don't see them as complete configurations
- shouldn't I need some kind of nat?
- definitively I need firewall rules I also noticed I have some default ipsec rules. do they relate?
Code: Select all
/ip firewall filter
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
So I ended with this
Code: Select all
/ip pool
add name=dhcp ranges=10.10.10.200-10.10.10.250 # local pool
add name=vpn-pool ranges=10.10.10.251-10.10.10.254 # vpn pool
/ppp profile
add change-tcp-mss=yes local-address=10.10.10.1 name=vpn-profile only-one=yes remote-address=vpn-pool use-encryption=yes
/ppp secret
add name=user password=userpw profile=vpn-profile service=l2tp
/interface l2tp-server server
set authentication=mschap2 default-profile=vpn-profile ipsec-secret=my_secret one-session-per-host=yes use-ipsec=yes
again any insight is welcome