Community discussions

MikroTik App
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Last used IP from statistics

Sat Jan 03, 2015 2:02 am

need to get the value of "Last used IP:" from statistics

but when i run
tool/user manager/user print
it won't show up there!
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: Last used IP from statistics

Fri Jan 09, 2015 3:52 pm

come on guys need some answer please.....
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: Last used IP from statistics

Fri Jan 09, 2015 6:19 pm

This value changes randomly in my eyes. I have not found any relationship with anything else. How do you want to use it?
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: Last used IP from statistics

Fri Jan 09, 2015 7:09 pm

I can't use static ip!

the ip of unpaid users must be added to address list to block internet.

when a user logs-in in pppoe i must know whats their ip to add the ip to address list..

paid and unpaid users are set from user-manager comment.
:local un
:local ip
:local co

:foreach i in=[/ppp active find] do={
:set un [/ppp active get $i name];

:foreach x in=[/tool user-manager user find where name=$un] do={:set co [:pick [/tool user-manager user get $x comment] 0 3];}

:if ($co="off") do={ THE SLOWEST APPROCH EVER}

}
This above code is unfinished yet but its so slow it can't be used....
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Last used IP from statistics

Fri Jan 09, 2015 9:57 pm

It's too easier from:

Access to your userman via web, then:

Users / <desired user> / show sessions
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: Last used IP from statistics

Fri Jan 09, 2015 10:37 pm

in user manager is there a function that is the opposite of "create-and-activate-profile" ?

which it will remove the current profile?
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Last used IP from statistics

Sat Jan 10, 2015 9:02 pm

in user manager is there a function that is the opposite of "create-and-activate-profile" ?

which it will remove the current profile?
What do you mean? (bad English understanding :D )
you mean you wanted to remove profile or profile which assigned to users? :D
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: Last used IP from statistics

Sat Jan 10, 2015 9:15 pm

I want to remove actual profile using script.
actual profile assigned to the user.
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Last used IP from statistics

Mon Jan 12, 2015 12:00 pm

still thinking :D
it's easy to remove profile but assigned profile from terminal?
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Last used IP from statistics

Mon Jan 12, 2015 12:01 pm

still thinking :D
it's easy to remove profile but assigned profile from terminal?
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: Last used IP from statistics

Tue Jan 13, 2015 1:25 pm

To assign a profile to a user you just use "create-and-activate-profile"

but i want to remove a profile assigned to a user???

i don't want to delete the profile it itself.. just want to take it away from a user...

I hope my question is clear
 
User avatar
hossain2004a
Member Candidate
Member Candidate
Posts: 247
Joined: Mon Dec 22, 2014 7:34 pm
Location: Iran

Re: Last used IP from statistics

Tue Jan 13, 2015 8:40 pm

why not using Web interface?
another question, Why you want to do such thing? for what reason?
 
User avatar
neandero
Member Candidate
Member Candidate
Topic Author
Posts: 243
Joined: Fri Jul 17, 2009 11:43 am
Location: Inside Mind

Re: Last used IP from statistics

Wed Jan 14, 2015 8:33 pm

So i guess there is no possible way to accomplish this request through scripting?

Please Mikrotik add this function!

Who is online

Users browsing this forum: No registered users and 12 guests