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

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

Re: Bash - Name and IP of any Gateway?

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)
Danny
Pearl

Re: Bash - Name and IP of any Gateway?

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