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

One-liner to show Geo Policy on gateways

📕 Referenced in the book: Max Power 2020

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

0 Replies

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events