Convert Checkpoint SPLAT routes into Gaia route configuration commands
`
Hi there, not much of a script , just the one-liner to turn output of the Secure Platform cli command route/ip route list into the ready for copy&paste; list of Gaia clish commands.
Be aware I am not doing any error checking, so examine the final result before applying to a production system.
You should run it on SPLAT cli being in expert mode.
ip route list | awk '/via/ {print " set static-route ",$1," nexthop gateway address " $3," on "}'
set static-route 172.19.0.0/16 nexthop gateway address 172.12.255.4 on
set static-route 172.20.0.0/16 nexthop gateway address 10.20.20.6 on
set static-route default nexthop gateway address 19.9.15.33 on
Follow me on https://www.linkedin.com/in/yurislobodyanyuk/ not to miss what I publish on Linkedin, Github, blog, and more.