Community discussions

MikroTik App
 
qudama
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Mon Feb 24, 2014 2:26 am

ppp secret disable users with remove users from active connection!

Fri Apr 03, 2015 8:58 am

Hello,
i can disable users from ppp secret by this code on system schedule :

/ppp secret
set [find routes=1] disable=yes

also i want disconnect this user from active like this code but i dont want with name !!!

ppp active remove [find name=admin]


:P)
 
qudama
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Mon Feb 24, 2014 2:26 am

Re: ppp secret disable users with remove users from active connection!

Fri Apr 03, 2015 9:03 am

any idea?? :? :(
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: ppp secret disable users with remove users from active connection!

Fri Apr 03, 2015 5:27 pm

Your code seems completely reasonable and valid to me.
Why don't you want to use the name?
 
qudama
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Mon Feb 24, 2014 2:26 am

Re: ppp secret disable users with remove users from active connection!

Tue Apr 07, 2015 7:01 am

because i cant do system schedule for every one !!
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: ppp secret disable users with remove users from active connection!

Tue Apr 07, 2015 9:22 pm

What are you trying to do?
(general terms, nothing technical)

It sounds like you're trying to manually expire and disconnect accounts. This is okay for a few accounts, but after you have more than just a dozen or so, you really should use RADIUS. With a good RADIUS database, you can set expiration dates on accounts, and have a script that updates the expiration date every time the customer pays their bill, etc.

With expiration dates in RADIUS, the user cannot stay connected even one second beyond the time their account expires, and this is done automatically by the Mikrotik. If the user logs in and the RADIUS server tells the Mikrotik that the account will expire in 14 seconds, then 14 seconds later, the Mikrotik will disconnect the user.
 
qudama
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Mon Feb 24, 2014 2:26 am

Re: ppp secret disable users with remove users from active connection!

Fri Apr 10, 2015 5:00 pm

What are you trying to do?
(general terms, nothing technical)

It sounds like you're trying to manually expire and disconnect accounts. This is okay for a few accounts, but after you have more than just a dozen or so, you really should use RADIUS. With a good RADIUS database, you can set expiration dates on accounts, and have a script that updates the expiration date every time the customer pays their bill, etc.

With expiration dates in RADIUS, the user cannot stay connected even one second beyond the time their account expires, and this is done automatically by the Mikrotik. If the user logs in and the RADIUS server tells the Mikrotik that the account will expire in 14 seconds, then 14 seconds later, the Mikrotik will disconnect the user.

gooooooooooooooooooooooooooooooood