Showing results for 
Search instead for 
Did you mean: 
Create a Post

One-liner to show Geo Policy on gateways

One-liner (Bash) to show the active Geo Policy on Check Point gateways.
In expert mode run:

if [ -z `pidof in.geod` ]; then echo; echo 'Geo Policy Blade not active!'; echo; else echo; echo -n '### GEO POLICY: '; cat $FWDIR/state/local/FW1/local.set | egrep -A2 geo_settings_profile | tail -n1 | tr -d '():val ' | sed -e 's/$/ ###/'; echo; echo -e ' Country\t\tDirection\tAction'; echo -n ' '; printf '%.s-' {1..46}; egrep -B4 country_dispaly_name $FWDIR/state/local/FW1/local.set | tac | sed '/alert/d' | tr -d '():' | sed ':a;N;$!ba;s/\n/ /g' | sed 's/ -- /\n/g' | sed 's/country_dispaly_name//g' | sed 's/country_code /(/g' | sed 's/ direction /)\t\t/g' | sed 's/ block true/\tBLOCK/g' | sed 's/ block false/\tACCEPT/g' | sort; echo; fi

The One-liner is also integrated with our ccc script.

Thanks to Tim Hall's preliminary work in this thread.

-- More one-liners --

One-liner for Address Spoofing Troubleshooting
One-liner to show VPN topology on gateways
FW Monitor SuperTool