Community discussions

MUM Europe 2020
 
manoloon
just joined
Topic Author
Posts: 4
Joined: Wed Oct 17, 2007 8:33 pm

L2tp o PPTP -server with dynamic ip

Mon Mar 29, 2010 3:01 am

People , good morning , i have a problem, maybe is a sillyness but meanwhile is a problem, I am working in a two point offices and I want to connect them with a vpn L2TP would be the best but I can work even with PPTP , but the problem is that the command : connect-to= has to be a ip , it doesnt accept an url like office.changeip.net . someone knows how to deal with this? Thanx in advance
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5971
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: L2tp o PPTP -server with dynamic ip

Mon Mar 29, 2010 9:58 am

You have to write a script and run it from time to time

http://wiki.mikrotik.com/wiki/Manual:Sc ... _host-name
 
manoloon
just joined
Topic Author
Posts: 4
Joined: Wed Oct 17, 2007 8:33 pm

Re: L2tp o PPTP -server with dynamic ip

Mon Mar 29, 2010 7:54 pm

Thanx , this is the script made for this task : thanks to the support people of mikrotik !
the script :
:local resolvedIP [:resolve "xxxx.changeip.net"];
:local l2tpid [/interface find comment="l2tpid"];
:local currentIP [/interface l2tp-client get l2tpid connect-to];

:if ($resolvedIP != $currentIP) do={
/interface l2tp-client set l2tpid connect-to=$resolvedIP;
/log info "l2tp ip updated";
}

Index : l2tpid : is the comment name that I gave to the interface

Who is online

Users browsing this forum: allevot, kwal, Maggiore81, MSN [Bot], vytuz and 107 guests