Community discussions

MikroTik App
 
sldnkarm
just joined
Topic Author
Posts: 9
Joined: Thu Oct 13, 2005 1:16 am
Contact:

Access-List File Manipulation

Tue Jul 08, 2008 8:39 pm

I am needing to download and use a file to parse through a list of MAC's (one per line) and add or remove based on the new file downloaded to the AP. I will have to step through the current access-list mac's and decide which ones need to be removed, then step through the new list of mac's and see which ones need to be added. Is this possible to complete in a script?

I can get the file downloaded to the AP, but have had no luck parsing through the file and pulling the mac's out to compare to the access-list. Any help would be much appreciated.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6697
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Access-List File Manipulation

Wed Jul 09, 2008 4:12 pm

How do you see this process ?

> I will have to step through the current access-list mac's and decide which ones need to be removed


It is possible to get current access-list configuration.
interface wireless access-list export file=1
Login to the router by ftp and download it to your computer.
Go trough that list and check all the MAC-addresses, add new MAC-addresses if you need.

Upload file back or even paste it to the console, apparently before you need to erase all access-list rules that were before.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26918
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Access-List File Manipulation

Wed Jul 09, 2008 4:26 pm

I think the original poster wanted to do the other way - use "tool fetch" to get an export file, and to autmatically update access list. I think you can only make a script that will remove all entries, and will import the new ones.

Who is online

Users browsing this forum: No registered users and 17 guests