Community discussions

MikroTik App
 
miro9970
just joined
Topic Author
Posts: 7
Joined: Mon May 16, 2011 6:19 pm

OpenVPN connection stays dynamic

Mon Aug 08, 2011 9:44 pm

I have OpenVPN server interface in Mikrotik with PPP username specified in it, so that when this user dials in, his connection automatically gets assigned to this interface.

The problem is that sometimes user dials in and his connection stays dynamic (i.e DR <user-ovpn>), never gets assigned to OpenVPN server interface. Any suggestions?

Cheers,

Mir

update:
Just realised that this is happening because old connection to OpenVPN server Interface does not get reset after user loses connection and Mikrotik still thinks that user is connected to that interface, that's why when user tries to re-connect he only gets dynamic interface.
So my question is why, even if you are disconnected, Mikrotik thinks that someone is still connected to that interface?
This is happening for both, Linux and Windows clients including Mikrotik to Mikrtoik tunnels.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: OpenVPN connection stays dynamic

Tue Aug 09, 2011 9:33 am

If user is not disconnecting properly, unexpected reboot, killed ovpn client etc.
Then there is no way server would know that client is no longer available. To fix the problem adjust keepalive-timeout value and set only-one=yes in ppp profile used by ovpn server.
 
miro9970
just joined
Topic Author
Posts: 7
Joined: Mon May 16, 2011 6:19 pm

Re: OpenVPN connection stays dynamic

Tue Aug 09, 2011 11:52 am

Thank you for your prompt reply,

I have done as you have suggested (enabled keep-alive feature in Ovpn server settings)
Straight after I did that, all VPNs have dropped.
I have disabled keepalive but VPN did not come back up.
Rebooted Mikrotik, works fine again.

I will try again this evening.

Thanks again for the answer.

M

update
Last night I have changed keepalive setting in winbox by going to: "PPP-->Interface-->Ovpn Server" this caused Ovpn server crash.
This time I have done it via command "ppp profile set only-one=yes seapoint_openvpn_ser
vers_profile"
as suggested. Will keep my eye on the result, thanks again for suggestion.
update2
Also in profile settings enabled idle-timeout so that if connection is not active (ie ghost connection), Mikrotik will kill it. http://www.mikrotik.com/testdocs/ros/2. ... aa_ppp.php
 
miro9970
just joined
Topic Author
Posts: 7
Joined: Mon May 16, 2011 6:19 pm

Re: OpenVPN connection stays dynamic

Thu Aug 11, 2011 9:35 pm

still have the same problem. When I close openVPN client not properly, or I lose internet connection, I can not reconnect again as Mikrotik still thinks that I am connected.
Is there a way to tell Mikrotik to kick existing connection if the user is trying to connect with the same user name? It think its logical.
 
rwinnik
just joined
Posts: 2
Joined: Fri Apr 29, 2016 5:06 pm

Re: OpenVPN connection stays dynamic

Mon May 23, 2016 9:51 am

I know it has been quite a bit of time but did you ever get this resolved? I have the same problem with a station to station configuration. When the internet drops, the ovpn server does not drop and reset. I have to reboot the router each time.
 
zvekyf
just joined
Posts: 21
Joined: Thu Sep 29, 2016 1:29 am

Re: OpenVPN connection stays dynamic

Thu Nov 03, 2022 10:21 pm

ver 7.6

we alse see same problem.
It would be nice that there is something to check and clear problematic interfaces/active connections.
 
rifkytech
just joined
Posts: 11
Joined: Fri May 03, 2019 1:12 pm
Location: Medan, Indonesia
Contact:

Re: OpenVPN connection stays dynamic

Wed Feb 22, 2023 4:01 pm

i get same problem, why mikrotik dont answer this question?
 
rifkytech
just joined
Posts: 11
Joined: Fri May 03, 2019 1:12 pm
Location: Medan, Indonesia
Contact:

Re: OpenVPN connection stays dynamic

Tue Mar 28, 2023 7:41 pm

i need solve my problem please....
 
ShayanPAL
newbie
Posts: 47
Joined: Thu Dec 19, 2019 12:20 pm

Re: OpenVPN connection stays dynamic

Fri Apr 07, 2023 2:02 am

Ver 7.7
Same problem
 
peich1
just joined
Posts: 5
Joined: Mon Dec 11, 2017 9:43 am

Re: OpenVPN connection stays dynamic

Tue Apr 18, 2023 4:11 pm

And the same with 7.8...
 
User avatar
amb3r
just joined
Posts: 16
Joined: Fri Oct 31, 2014 8:35 am

Re: OpenVPN connection stays dynamic

Fri Apr 28, 2023 4:29 pm

still having this issue in version 7.8 and its causing hardware lock up and need to reboot the router to gain access.
 
User avatar
hosi69
just joined
Posts: 2
Joined: Mon Sep 18, 2017 10:07 am

Re: OpenVPN connection stays dynamic

Thu Jan 18, 2024 12:51 am

You should remove "D" flags with script and schedule. It's Mikrotik bug.
Add your script with name remove-useless-script
/system script add 
name=remove-useless-script owner=admin dont-require-permissions=yes policy=ftp,password,policy,read,reboot,romon,sensitive,sniff,test,write source={/interface/ovpn-server/remove [find where running=no and dynamic=yes]}
Add Scheduler to run your script with name remove-useless-scheduler.
change the start date on your own date
/system scheduler  add
name=remove-useless-scheduler interval=00:01:00 policy=api,local,policy,reboot,romon,sniff,telnet,web,write,ftp,password,read,rest-api,sensitive,ssh,test,winbox on-event=remove-useless-script start-date=Jan/18/2024

Who is online

Users browsing this forum: Bing [Bot], itamx and 94 guests