On the gateway I often have the question how to reach the management server if I do not know the customer environment.
- What is the Managenemt Server IP address?
- Via which interface is the Management Server connected?
- What is the name of my Management Server?
To show this easily, I have created a small oneliner.
clear;echo -n "Name: "; more $FWDIR/conf/masters | grep -A 1 Policy | grep -v Policy; test=$(more $FWDIR/state/local/FW1/local.implied_rules | grep -A 10 accept_cpmi_port_reverse | grep -A 1 src | grep -v src | awk '{split($0,a,"\""); print a[2]}' | awk '{split($0,a,"-"); print a[1]}'); echo "IP: $test"; echo -n "Network: "; ip route show to match $test | grep kernel |awk '{split($0,a," "); print a[3]}'
It shows you the info simply - as follows:
➜ CCSM Elite, CCME, CCTE ➜ www.checkpoint.tips