hello folks!
I need big help with this : I’m using dhcp assigned dynamic public IP address that changes each two or three days. I have three notebooks connected by wireless at home [they use private 10.0.0.x addresses], so I have to do NAT at server.
Each time public IP changes, I have to connect to server and manually change this NAT rule. I’m just getting fed up with this - please help me to create script that will change this automatically. I have done correctly monitoring of conditions “when to change” and I’m able to perform this change for some fixed address typed manually instead of ?? with commands below, I’m just unable to take out the new dynamic address from public interface and use it
/ip firewall nat set [/ip firewall nat find comment=NAT-for-all-three-notebooks] to-addresses=??
- and here I don’t know how to define “take current address from /ip dhcp-client print detail output where interface name=public-interface” *
Thank you in advance!