Hello,
I try to config my router in L2TP/IPsec in order to interface my Android smartphone.
In /ppp secret
local-address = gateway address = local router address(192.168.1.1)
remote-address = ?
the smartphone has an IP address (192.168.1.36) but the phone provider change it (83.x.y.z): what info shall i set for remote-address ?
Jun/17/2019 14:34:38 ipsec no IKEv1 peer config for 83.x.y.z <---------------------------- ?
Jun/17/2019 14:35:08 l2tp,debug,packet rcvd control message from 83.x.y.z:18436 to 85.a.b.c:1701
Jun/17/2019 14:35:08 l2tp,debug,packet tunnel-id=0, session-id=0, ns=1, nr=0
Jun/17/2019 14:35:08 l2tp,debug,packet (M) Message-Type=StopCCN
Jun/17/2019 14:35:08 l2tp,debug,packet (M) Assigned-Tunnel-ID=46524
Jun/17/2019 14:35:08 l2tp,debug,packet (M) Result-Code=6 <------------------------------ ?
StopCCN returns code 6 ?
Does exist a full and clean configuration somewhere to interface an Android device with l2tp/ipsec ?
Thank you by advance
You can set the remote IP address to anything you would like as it is a point to point address it doesnt really matter what you set it to or if it is within the same classical subnet scheme(since p2p addresses dont ‘use’ subnets) the main thing is that each device has its own unique remote address by making multiple secrets or creating an IP pool and adding it to the profile the secrets use (IP addresses only need to be set in either profile or secret if both are set the secret ip will over ride the profile FWI)
You can keep the local address the same on each connection though 
Also have a guide on how to set up a l2tp server and connect via mikrotik or windows taht might be handy
For the mikrotik:
/interface l2tp-server server
set enabled=yes ipsec-secret=Password1 use-ipsec=required default-profile=default-encryption
/ppp secret
add name=test password=Password2 add local-address=192.168.50.1 remote-address=192.168.40.1
For the windows client:
VPN provider= windows built in
connection name =(what ever you would like to name it)
Server name or address= (IP address of the router you applyed the configuration on, please ping this address to make sure it is reachable)
VPN type= L2TP/IPsec with pre-shared key
Pre-shared key = Password1
type of sign in info = username and password
username = test
password = Password2
for mikrotik client:
/interface l2tp-client
add connect-to=(IP address of the router you applyed the configuration on, please ping this address to make sure it is reachable) disabled=no ipsec-secret=Password1 name=l2tp-out1
password=Password2 use-ipsec=yes user=test
Thank you for your reply.
I set remote-address to 192.168.1.36 as you advice me !
But always the same error: StopCCN code=6
I use an Android smartphone, not Windows
Note 1: I followed the “Basic L2TP/IpSec setup” described in https://wiki.mikrotik.com/wiki/Manual:Interface/L2TP
Note 2: resume of the log:
- loop of 10 sequences:
ipsec received from 83… (607 bytes)
no IKEV1 peer config for 83…
- delay
- l2lp sequence
rcvd sccrq
send sccrp
rcvd stopccn (code=6)
send ok
tunnel dead