Hey chaps, I’ve got a few scripts built that email me on various events but I’m stumped on this! I assume I am being a tool but how can I write a script to change the SRC-NAT in IP Firewall? At first I purely want two scripts to change this from one to another and eventually I may write one script to automate the process i.e change over until second gateway stable for x mins…
Something like changing
ip firewall nat
add action=src-nat chain=srcnat comment="vlan 2 (Public Area 2)" src-address=192.168.2.0/24 to-addresses=*.*.*.2
add action=src-nat chain=srcnat comment="vlan 3 (Public Area 3)" src-address=192.168.3.0/24 to-addresses=*.*.*.3
To
ip firewall nat
add action=src-nat chain=srcnat comment="vlan 2 (Public Area 2)" src-address=192.168.2.0/24 to-addresses=*.*.*.4
add action=src-nat chain=srcnat comment="vlan 3 (Public Area 3)" src-address=192.168.3.0/24 to-addresses=*.*.*.5