Community discussions

MikroTik App
 
speednet
just joined
Topic Author
Posts: 1
Joined: Wed Jan 17, 2018 2:34 pm

script auto ip mac pppoe

Wed Jan 17, 2018 2:46 pm

Good morning gentlemen!

I'm new here, and I'm looking for the next solution:

I have a script running to capture IP + MAC in PPPoE, and I would like to modify it so that it does not capture the IP and MAC of the users that have comments for example "support".

I'm going to post here the script I'm using. see if you can help me.


:foreach x in=[/ppp active find] do={
:global address [/ppp active get $x address];
:global user [/ppp active get $x name];
:global mac [/ppp active get $x caller-id];
/ppp secret set $user caller-id=$mac remote-address=$address;
}
# :foreach h in=[/ppp active find] do={
# :global name [/ppp active get $h value-name=name];
# :global mac [/ppp active get $h value-name=caller-id];
# /ppp secret set $name caller-id=$mac
#}

Who is online

Users browsing this forum: Bing [Bot] and 27 guests