Page 1 of 1

Don't know how to remove an interface from NAT rule

Posted: Fri Feb 13, 2015 4:40 pm
by bobr
Hi there to all!
It may seem ridiculous, but I can't figure it out, how to remove an interface from a NAT rule.
For example, I have a rule like this:
[root@MikroTik] /ip firewall nat> print                              
Flags: X - disabled, I - invalid, D - dynamic 
 0    ;;; default configuration
      chain=srcnat action=masquerade to-addresses=0.0.0.0 
      src-address=192.168.1.0/24 out-interface=wlan1-gateway log=no 
      log-prefix="" 
and I need to remove the out-interface from the rule to obtain something like this:
Flags: X - disabled, I - invalid, D - dynamic 
 0    ;;; default configuration
      chain=srcnat action=masquerade to-addresses=0.0.0.0 
      src-address=192.168.1.0/24 log=no 
      log-prefix="" 
How do I suppose to do that?
I've tried many variants, like:
/ip firewall nat
	set 0 out-interface=""	
#or
	set 0 out-interface=none
#or
	set 0 out-interface=
#or even
	set 0 out-interface=nill
and many more. Nothing worked. I know it's somewhere around, but I can't find the solution either.
Can someone help me with that?

Re: Don't know how to remove an interface from NAT rule

Posted: Fri Feb 13, 2015 6:08 pm
by 9939781
you can try unset 0 out-interface

Re: Don't know how to remove an interface from NAT rule

Posted: Mon Feb 16, 2015 9:28 am
by bobr
you can try unset 0 out-interface
OMG, it worked!!11!11!1 It was that simple? I've been messing around for couple of hours and the answer was so close...
Buuut, I stil wonder, it there is another way to do that?

Re: Don't know how to remove an interface from NAT rule

Posted: Mon Feb 16, 2015 11:29 am
by 9939781
you can try unset 0 out-interface
OMG, it worked!!11!11!1 It was that simple? I've been messing around for couple of hours and the answer was so close...
Buuut, I stil wonder, it there is another way to do that?
i don't know another way怂but this way is work good :lol: