Community discussions

MikroTik App
 
User avatar
ZoemDoef
just joined
Topic Author
Posts: 23
Joined: Fri Oct 20, 2006 11:02 am
Location: South Africa

Mangle to match wildcard address list entries

Fri Nov 21, 2008 12:23 pm

I am attempting to set a mangle rule which matches a few address lists. I would like to achieve this by using a wildcard in the matching src address list entry. If the address lists i need to match all starts with incl**** how do i need to set this in the mangle src address list ?
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Mangle to match wildcard address list entries

Fri Nov 21, 2008 12:34 pm

1st rule: src-address-list=incl1 action=jump to 'xxx' chain
2nd rule: src-address-list=incl2 action=jump to 'xxx' chain
3rd rule: src-address-list=incl3 action=jump to 'xxx' chain
4th rule: guess what =)


'xxx' chain: do what you want
 
User avatar
ZoemDoef
just joined
Topic Author
Posts: 23
Joined: Fri Oct 20, 2006 11:02 am
Location: South Africa

Re: Mangle to match wildcard address list entries

Fri Nov 21, 2008 12:42 pm

Thanks for the reply

I was hoping i could do that in just one mangle entry:

src-address-list=incl(WILDCARD *) action=jump to 'xxx' chain
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Mangle to match wildcard address list entries

Fri Nov 21, 2008 2:10 pm

on the other hand you can create address-list that contains all these entries. and if you have to merge several, you can use scripting, to remove old entries and recreate full list once more as there are no wild-cards available.
 
User avatar
ZoemDoef
just joined
Topic Author
Posts: 23
Joined: Fri Oct 20, 2006 11:02 am
Location: South Africa

Re: Mangle to match wildcard address list entries

Fri Nov 21, 2008 2:27 pm

Hello Janisk

Thats exactly what I have at this stage, for each rule that creates an address-list entry i added another rule which then adds this entry to a global address list. It would have been much simpler to use either a regex or wildcard to match these address lists. Thank you for your reply though.