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

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

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



Tags (1)

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: