Hi,
Hope someone can assist as I am not very good with Mikrotik router scripts.
Environment:
* Mikrotik Router is behind a modem of a ISP provider. This provider only allows dynamic IPs so the IP address and Gateway regularly change and this breaks the internal gateway setup.
* The ISP modem is connected directly to MikroTik router port etherX.
* The connection is setup within MikroTik as a "DHCP Client <etherX>"
* The Mikrotik router is directly connected over a VPN tunnel to another mikrotik router at a data center with a fixed IP address. Through this data center the traffic from within the LAN is pushed in and out.
Goal:
1. Add a script to "DHCP Client <etherX>" that automatically checks every 10 min. the Gateway address provided for by the ISP provider.
2. If it changed, update the new Gateway address in the Routing table at the Route that has the data centers static IP address [xxx.xxx.xxx.xxx].
3. Clean up the data reference to the old gateway address [xxx.xxx.xxx.xxx unreachable etherX] in the Routing table.
Hope someone could assist me with this script.
Much appreciated.
Thanks