Community discussions

MikroTik App
 
agshekeloh
just joined
Topic Author
Posts: 10
Joined: Tue May 03, 2011 11:09 pm
Contact:

remove part of a config line?

Thu Sep 25, 2014 8:52 pm

Hi,

I have an ip firewall filter rule much like this:

1 ;;; accept gre for pptp
chain=input action=accept protocol=gre dst-address=192.0.2.12

I want to remove the dst-address constraint at the command line. I can set it to 0.0.0.0/0, which has the same effect, but that seems like a workaround.

Can anyone point me in the right direction?

Thanks,
==ml
 
User avatar
skot
Long time Member
Long time Member
Posts: 584
Joined: Wed Nov 30, 2011 3:05 am

Re: remove part of a config line?

Thu Sep 25, 2014 11:49 pm

You can search using the IP and protocol... but be careful in case any other rules contain the same IP & protocol (they will be unset as well):
/ip firewall filter unset [find dst-address="192.0.2.12" protocol="gre"] dst-address
Or change it by using the item number you get after doing a print (in yours it was the number 1):
/ip firewall filter unset 1 dst-address