Community discussions

MikroTik App
 
User avatar
Wangz
newbie
Topic Author
Posts: 39
Joined: Wed Apr 15, 2020 4:41 pm

Adding Dynamic PPPoe-Clients to Interface List

Sun Sep 13, 2020 2:51 am

Hi guys, i have a problem. It's because of my mangling that i wanted to add dynamic pppoe-clients to the interface-list.

As of now i have done it by making my own script with this:

:foreach i in [/interface pppoe-server find name~"<pppoe-*"] do {/interface list member add interface=$i list=LAN}

the problem with this script is that if the client get disconnected randomly and reconnects, the interface became unknown

i have a solution for that using this command:

/interface list member remove numbers=[ find where list=LAN && interface~("^\\*[A-Z]+") ]

It does the job removing the unknown interface. The thing is when the client reconnects and the script above foreach that i have used won't work anymore and it won't get an update because some have added already and breaks the script. If i remove all interface list of pppoe clients then it updates and add the client that have disconnected.

Does anyone knows how to fix it?

Edit: I have tried using this command at up in pppoe-profile

/interface list member add interface=[find interface=<pppoe*] list=LAN

i get error: ambiguous value of interface, more than one possible value matches input

That's all thank you.
 
User avatar
Wangz
newbie
Topic Author
Posts: 39
Joined: Wed Apr 15, 2020 4:41 pm

Re: Adding Dynamic PPPoe-Clients to Interface List

Sun Sep 13, 2020 6:27 am

Did something like this :do {:foreach i in [/interface pppoe-server find] do {[/interface list member add interface=$i list=LAN comment="PPPOE ENABLED"]}} on-error={};

It does add when i deleted all the entries. When 1 client transform into unknown the other script will take care of the unknown but the script above does not add it again until i will delete all the entry. It does bypass the error though. I suspect it has something to do to an error that prevents it from running.
 
shinichi
just joined
Posts: 1
Joined: Thu Feb 25, 2021 8:58 pm

Re: Adding Dynamic PPPoe-Clients to Interface List

Thu Feb 25, 2021 9:05 pm

May i know why you wanted this ?, because from my perspective from the interface lists you can add / include dynamic interface list, dynamic includes all pppoe-clients.

Image
 
woro
Member Candidate
Member Candidate
Posts: 104
Joined: Sun May 24, 2015 12:47 am

Re: Adding Dynamic PPPoe-Clients to Interface List

Mon Sep 06, 2021 4:48 pm

I found this when I tried to find a solution to possibly put my openvpn ppp interfaces into the LAN list for some firewall rules to apply correctly.
I now implemented to include "dynamic" into the LAN list but I'm wondering what other interfaces may be dynamic which maybe shouldn't treated as LAN/internal.
At this moment I don't have any (if D is the flag indicating that in the interface list).
 
tdw
Forum Guru
Forum Guru
Posts: 1843
Joined: Sat May 05, 2018 11:55 am

Re: Adding Dynamic PPPoe-Clients to Interface List

Wed Sep 08, 2021 1:44 am

i have a problem. It's because of my mangling that i wanted to add dynamic pppoe-clients to the interface-list.

As of now i have done it by making my own script with this:
A script is not needed, you can specify an interface list in the PPP profile used by the PPPoE server - the dynamic interface created when the PPPoE client connects it is added to the list specified automatically, and removed when the client disconnects.

Who is online

Users browsing this forum: No registered users and 18 guests