address translation by interface

Hello-

First post. RouterOS 5.15 on routerboard 4000 series.

In a source NAT configuration, is there any way to match source addresses for all the addresses on an interface, without explicitly writing the address range? I would like to be able to change the IP of an interface without having to change firewall settings.

In other words, I have an interface bridge1 for subnet 192.168.2.0/24, and my current settings are:
/ip firewall nat add chain=srcnat action=masquerade src-address=192.168.2.0/24

…but instead I would like to use something like
/ip firewall nat add chain=srcnat action=masquerade src-address=bridge1

I tried using src-address-type=local but that appears to only match the addresses of the router’s interfaces, but not the addresses on the interfaces’ subnets.

Thanks,
Gabe

You could use the in-interface and out-interface options.

what is the goal? the most correct variant is

/ip firewall nat add chain=srcnat out-interface=Internet action=masquerade