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

Bash - Name and IP of any Gateway?

I‘m looking for a way to retrieve the name and IP address of any Check Point gateway locally on the system exactly as they are shown in the gateway list of SmartConsole, including VS systems.

Environment:  Expert Mode (Bash).

For Non-VS systems this could be easily performed via: grep `hostname` /etc/hosts

However, I need a solution that also works on VSX systems in different VS environments.

2 Replies
HeikoAnkenbrand
Champion Champion
Champion

Hi @Danny,

I don't understand exactly what you want. Use this script from me and execute the commands on all gateways.

GAIA - Easy execute CLI commands on all gateways simultaneously

# gw_mbash grep `hostname` /etc/hosts          ==> Here you should see the hostnames

# gw_mbash vsx stat -v                                          ==> Here you should see the names for all vsx systems

 

 

➜ CCSM Elite, CCME, CCTE ➜ www.checkpoint.tips
Danny
Champion Champion
Champion

I'm working on improving this One-Liner that is executed locally on physcial and virtual gateways (VS). So cprid executed on the management doesn't help here.

I figured it all out by myself now. Name of the current VS environment:

echo $vsname

IP address is in:

$FWDIR/state/local/FW1/local.vs_netobj

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events