Community discussions

MikroTik App
 
Jimmy
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Thu Sep 29, 2011 11:42 pm
Location: Denmark
Contact:

L2TP get ip on 0.0.0.0 in remote ip?

Sun Jan 14, 2024 9:51 pm

Hello everyone and happy new year
I'm really starting to have a lot of problems with poor mobile connections that I run the VPN on. The big problem is when the connection comes again does my VPN get a 0.0.0.0 ip? Now I have lived with logging on to my VPN server/router for over 6 months and under ppp > active connections I just click on the VPNs that have been given ip redresse 0.0.0.0 and then on remove. It's bad call ip, it's open only the ips you have put in pool and in profile where I have specified both local and remote ip which oddly enough a lot of times get 0.0.0.0. It is only all the clients who have sim cards on them that are the problem, the fixed lines work fine. All products are mikrotik and they are set up as standard L2TP where I then use local and remote ip to create an EOIP tunnel with, completely standard as all the guides say on mikrotik.
Is there a way to create a script that runs once every 15 min via seheduler which measures whether a PPP active connections has been given an ip 0.0.0.0 if so should it remove it?

I have already set up a script that pings 8.8.8.8 every hour and if there is no ping it resets the LTE connection, I need that because there are really challenges at small 30 locations that run over a mobile connection, and that part works fine enough , otherwise if I omitted this, they would just be active without internet on.

Hope someone can help.
Regards
Jimmy
 
Hober
just joined
Posts: 1
Joined: Mon Jan 15, 2024 4:01 am

Re: L2TP get ip on 0.0.0.0 in remote ip?

Mon Jan 15, 2024 4:19 am

Maybe you mean this:
/system scheduler add name=test interval=15m on-event={/ppp active remove [find address=0.0.0.0]}
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12014
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: L2TP get ip on 0.0.0.0 in remote ip?

Mon Jan 15, 2024 11:44 am

why { }?
use " ".
/system scheduler
add interval=15m name="drop l2tp stale connections" on-event="/ppp active remove [find where service=l2tp and address=0.0.0.0]"
 
Jimmy
Member Candidate
Member Candidate
Topic Author
Posts: 109
Joined: Thu Sep 29, 2011 11:42 pm
Location: Denmark
Contact:

Re: L2TP get ip on 0.0.0.0 in remote ip?

Sat Jan 20, 2024 11:49 pm

hi sorry for the late reply.
I went with rextended's script and ran with it since launch and it works perfectly.
Thank you very much.

Who is online

Users browsing this forum: No registered users and 3 guests