- Products
- Learn
- Local User Groups
- Partners
- More
Quantum Spark Management Unleashed!
Introducing Check Point Quantum Spark 2500:
Smarter Security, Faster Connectivity, and Simpler MSP Management!
Check Point Named Leader
2025 Gartner® Magic Quadrant™ for Hybrid Mesh Firewall
HTTPS Inspection
Help us to understand your needs better
CheckMates Go:
SharePoint CVEs and More!
Hi folks,
MDM Environment. How can I determine at the gateway where a policy was installed from? Even better, how can I determine the domain the gateway and policy belong to?
I tried finding a CLI command, MIB member, and even if I could find the name in logs or certificates. Has anyone figured this out?
TIA
George Ellis @ IHG
If you want to see the primary DMS name (and secondary if you have put it in the gateway under 'Fetch Policy') and the log servers, you can cat the masters file.
[Expert@EXLGW-s01-01:0]# cat /var/opt/CPsuite-R82/fw1/conf/masters
[Policy]
MgmtName
[Log]
MgmtName
[Alert]
MgmtName
emmap's solution is even better.
cat $FWDIR/conf/masters
I got lazy and asked grok to do it faster than I could type and verify...
cat $FWDIR/conf/masters | awk '/\[Policy\]/ {flag=1; next} /\[/{flag=0} flag' | tr '\n' ' ' | xargs
cat $FWDIR/conf/masters | awk '/\[Log\]/ {flag=1; next} /\[/{flag=0} flag' | head -n 1
cat $FWDIR/conf/masters | awk '/\[Backup\]/ {flag=1; next} /\[/{flag=0} flag' | head -n 1
You will get some clues from the following cmds:
netstat -an | grep 18192
cpstat fw
Netstat works to a degree as it list both MDMs. Not the preferred method as I will have to create a if/then to assign the domain name to a variable based on the last octet.
There are multiple ways to get the policy name either via snmpwalk or this method (which is what I use)
fw stat | awk '/localhost/ {print $2,$3}'
Bonus content: - Get the IP of the Log server.
cpstat fw -f log_connection |grep 'Log-Server Connected' | awk '{print $1}' | sed 's/|//g'
<Reply is IP>
cpstat fw -f log_connection |grep 'Log-Server Disconnected' | awk '{print $1}' | sed 's/|//g'
<Reply is IP>
See if this helps.
Andy
https://community.checkpoint.com/t5/General-Topics/Policy-location-on-a-gateway-R80/td-p/46865
Maybe check below too.
Andy
cat $FWDIR/state/local/FW1/local.set | grep -i policy
Im pasting what you said in the other post from few years ago, will also try this in my R81.20 and R82 labs.
Andy
************************
Thanks guys for the directory suggestions (and the other replies)
I found the cheat code.
cat $FWDIR/state/local/FW1/local.sic_name |grep 'o='|awk -F ,o= '{print $2}'|awk -F . '{print $NR}'
Background
cat local.sic_name
sic_name=cn=<fwname>,o=<domainname>..<CAthingy>
emmap's solution is even better.
cat $FWDIR/conf/masters
I got lazy and asked grok to do it faster than I could type and verify...
cat $FWDIR/conf/masters | awk '/\[Policy\]/ {flag=1; next} /\[/{flag=0} flag' | tr '\n' ' ' | xargs
cat $FWDIR/conf/masters | awk '/\[Log\]/ {flag=1; next} /\[/{flag=0} flag' | head -n 1
cat $FWDIR/conf/masters | awk '/\[Backup\]/ {flag=1; next} /\[/{flag=0} flag' | head -n 1
Your command is great too, just tested in my lab.
Andy
[Expert@CP-FW-01:0]# cat $FWDIR/state/local/FW1/local.sic_name |grep 'o='|awk -F ,o= '{print $2}'|awk -F . '{print $NR}'
cp-management
[Expert@CP-FW-01:0]#
If you want to see the primary DMS name (and secondary if you have put it in the gateway under 'Fetch Policy') and the log servers, you can cat the masters file.
[Expert@EXLGW-s01-01:0]# cat /var/opt/CPsuite-R82/fw1/conf/masters
[Policy]
MgmtName
[Log]
MgmtName
[Alert]
MgmtName
That is even better. It helps with verifying other things like "is there a secondary log server" and "is the HA MDM defined".
[Policy]
MgmtName
MgmtNameHA
[Log]
MgmtMLMPrimary
[Alert]
MgmtMLMPrimary
[Backup]
MgmtMLMSecondary
BONUS TIME.
We are worldwide with 13 CMAs. There is some mismatch of which firewalls are in which domain. So I am in the CLI and need to go to the SmartConsole CMA. If I don't remember where it resides, go to the MDM SC, click on GATEWAYS and SERVERS, look it up.
Oh, this is easy
"cat $FWDIR/conf/masters"
Ah, so open that CMA.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
User | Count |
---|---|
11 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
Wed 10 Sep 2025 @ 11:00 AM (CEST)
Effortless Web Application & API Security with AI-Powered WAF, an intro to CloudGuard WAFWed 10 Sep 2025 @ 11:00 AM (EDT)
Quantum Spark Management Unleashed: Hands-On TechTalk for MSPs Managing SMB NetworksFri 12 Sep 2025 @ 10:00 AM (CEST)
CheckMates Live Netherlands - Sessie 38: Harmony Email & CollaborationWed 10 Sep 2025 @ 11:00 AM (EDT)
Quantum Spark Management Unleashed: Hands-On TechTalk for MSPs Managing SMB NetworksFri 12 Sep 2025 @ 10:00 AM (CEST)
CheckMates Live Netherlands - Sessie 38: Harmony Email & CollaborationAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY