script change

Hi,

The following script was working, and stopped recently (upgrade to v3.4 from a previous version):

/ip firewall nat remove [/ip firewall nat find src-address=$ipaddress]

I’m not a programming person. How do I fix this?

Travis

what is the complete script? to help you find the problem

That is the only line that does not work… it’s part of a Perl script on a Unix server.

you will need to post the complete script for anyone to be able to help you . copy and just paste whole thing from the first { to the last }

MT has not confirmed it yet, but general consensus is that they introduced some bugs in scripting with 3.4. If you rely on scripting I would recommend rolling back to 3.3 until 3.5 comes out.

-Louis

It doesn’t seem to work on 3.3 either… I had 3.1 on it before, and I think it was working then.

There has to be an easy fix… all I need is the

/ip firewall nat find src-address=1.2.3.4

to actually return the value of the entry it is associated with. I know for a fact it was working in 2.9.

All I am trying to do is remove a firewall rule based on the IP address that I supply. Help?

I am running 3.4 at my house.
I tested this snippet of code and it works as expected.

:local address 10.20.30.40
/ip firewall nat remove [/ip firewall nat find src-address="$address"]

You may want to double check your script again or post it to have it reviewed.

-Louis