- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Bash - Name and IP of any Gateway?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
