set a rule with dynamically learned parameters ?

Consider these two firewall/nat rules :

chain=srcnat action=netmap to-addresses=10.10.0.0/24 src-address=192.168.1.0/24 out-interface=l2tp-out1
chain=dstnat action=netmap to-addresses=192.168.1.0/24 dst-address=10.10.0.0/24 in-interface=l2tp-out1

192.168.1.0/24 is lan subnet address released to device because of dhcp client running.

As they change time to time when connecting to various LANs (this is a “mobile” device) , is it possible to have them set dynamically , i.e. via a script ?? how ??

Thank you very much.

if ip from dchp make it static. from ip>> dhcp-server>> lease select ip assigned by dhcp and make it static.

Sorry, I mean automatically rewrite those two rules into this machine (running dhcp client), each time a new IP LAN subnet has been released to it.
Without human operation.

Check DHCP lease-script funcionality: https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Client

Set some kind of “tag” on your filter rules, comment is often used for this puprose, and look for these tagged filter rules inside lease-script and modify them as you want on-the-fly.

It seems feasible… thank you