Hi,
I just configured my first lt2p/ipsec with manual ipsec creation. There was a reason of stability issue due to ikev1 from ISP side, and I wanted to go with ikev2.
Below is my configuration.
There is a SERVER with 2 public addresses and a CLIENT with 1 public address
A => Public IP of ISP 1 of SERVER
B=> Public IP of ISP 2 of SERVER
C => Public IP of CLIENT
D & E => Private IP assigned from the l2pt
Server Side
/ip ipsec profile
add dh-group=modp1024 dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 hash-algorithm=sha256 name=offices nat-traversal=no
/ip ipsec peer
add address=46.C.C.C/32 exchange-mode=ike2 local-address=93.B.B.B name=main_from_cyta_backup passive=yes profile=offices send-initial-contact=no
add address=46.C.C.C/32 exchange-mode=ike2 local-address=93.A.A.A name=main_from_cyta_main passive=yes profile=offices send-initial-contact=no
/ip ipsec proposal
add auth-algorithms=sha256 enc-algorithms=aes-256-cbc name=offices pfs-group=none
/ip ipsec identityadd comment=M1_cyta_MAIN generate-policy=port-strict peer=main_from_cyta_main remote-id=ignore
add comment=M1_cyta_BACKUP generate-policy=port-strict peer=main_from_cyta_backup remote-id=ignore
/ip ipsec policy
add dst-address=46.C.C.C/32 dst-port=1701 level=unique peer=main_from_cyta_main proposal=offices protocol=udp src-address=93.A.A.A/32 src-port=1701
add dst-port=1701 level=unique peer=backup_from_cyta_main proposal=offices protocol=udp src-port=1701
add dst-address=46.C.C.C/32 dst-port=1701 level=unique peer=main_from_cyta_backup proposal=offices protocol=udp src-address=93.B.B.B/32 src-port=1701
add dst-port=1701 level=unique peer=backup_from_cyta_backup proposal=offices protocol=udp src-port=1701
/ppp secret
add name=USERNAME_1 profile=Profile_M1_CYTA_main remote-address=172.16.D.D service=l2tp
add name=USERNAME_2 profile=Profile_M1_CYTA_backup remote-address=172.16.E.E service=l2tp
Client Side
/ip ipsec profile
add dh-group=modp1024 dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 hash-algorithm=sha256 name=CL_hq nat-traversal=no
/ip ipsec peer
add address=93.A.A.A/32 exchange-mode=ike2 local-address=46.C.C.C name=CL_hq_backup profile=CL_hq
add address=93.B.B.B/32 exchange-mode=ike2 local-address=46.C.C.C name=CL_hq_main profile=CL_hq
/ip ipsec proposal
add auth-algorithms=sha256 enc-algorithms=aes-256-cbc name=CL_hq pfs-group=none
/ip ipsec identity
add peer=CL_hq_main remote-id=ignore
add peer=CL_hq_backup remote-id=ignore
/ip ipsec policy
add dst-address=93.A.A.A/32 dst-port=1701 level=unique peer=CL_hq_main proposal=CL_hq protocol=udp src-address=46.C.C.C/32 src-port=1701
add dst-address=93.B.B.B/32 dst-port=1701 level=unique peer=CL_hq_backup proposal=CL_hq protocol=udp src-address=46.C.C.C/32 src-port=1701
/interface l2tp-client
add connect-to=93.B.B.B disabled=no name=to_CY_backup profile=CL_l2tp user=USERNAME_2
add connect-to=93.A.A.A disabled=no name=to_CY_main profile=CL_l2tp user=USERNAME_1
Basically what I did is copy the configuration from the automatically generated configuration from l2tp with enabled IPsec encryption, and convert it to ikev2 equivalent.
It works and I use the L2TP for establishing BGP that I want successfully, but I would like that know if there is anything else I should add for security. For example if there is any additional automatic config from Mikrotik when I use IPsec enable option in L2TP tunnel.
For example, am I correct to assume that I don’t want under any circumstances the l2tp to establish while the IPsec tunnel is down? I am not sure how to check that.


