Difference between revisions of "project - log settings identify"

From cpwiki.net
Jump to: navigation, search
Check Point Profressional Services
(Created page with " == Problem: == indentify firewalls configured to log to CMA, or locally... anything except for CLM only. == script name: == ??? == scratch == mdsenv <ip> cpmiquerybi...")
 
(scratch)
 
(10 intermediate revisions by one user not shown)
Line 10: Line 10:
 
== scratch ==
 
== scratch ==
  
mdsenv <ip>
+
mdsenv <ip>
cpmiquerybin attr "" network_objects "firewall='installed'" -a __name__  ###indentify all firewalls
+
 
  cpmiquerybin object "" network_objects "name='firewall_name'" | sed -n -e '/:send_logs_to/,/:self_log_server/ p' | grep -E ":Name |self_log_server (true)"
+
cpmiquerybin attr "" network_objects "firewall='installed'" -a __name__  ###indentify all firewalls
 +
   
 +
 
 +
cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | grep self_log_server | sed -n 's/.*(\([^ ]*\))/\1/p' | grep -v ^$
 +
 
 +
cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | grep forward_logs | sed -n 's/.*(\([^ ]*\))/\1/p' | grep -v ^$
 +
 +
cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | grep log_switch_before_forwarding | sed -n 's/.*(\([^ ]*\))/\1/p'
 +
 
 +
cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | grep -A 1 log_forward_target | grep ":Name" | sed -n 's/.*(\([^ ]*\))/\1/p'
 +
 
 +
'''multiple results possible'''
 +
 
 +
cpmiquerybin object "" network_objects "name='$firewall_name'" | sed -n -e '/:send_logs_to/,/:self_log_server/ p' | grep -E ":Name" | sed -n 's/.*(\([^ ]*\))/\1/p' | tr '\n' ' '
 +
 
 +
cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | sed -n -e '/backup_log_servers/,/:send_alerts_to/ p'| grep -E ":Name" | sed -n 's/.*(\([^ ]*\))/\1/p' | tr '\n' ' '

Latest revision as of 16:57, 1 November 2013

Problem:

indentify firewalls configured to log to CMA, or locally... anything except for CLM only.


script name:

???


scratch

mdsenv <ip>

cpmiquerybin attr "" network_objects "firewall='installed'" -a __name__ ###indentify all firewalls


cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | grep self_log_server | sed -n 's/.*(\([^ ]*\))/\1/p' | grep -v ^$

cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | grep forward_logs | sed -n 's/.*(\([^ ]*\))/\1/p' | grep -v ^$

cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | grep log_switch_before_forwarding | sed -n 's/.*(\([^ ]*\))/\1/p'

cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | grep -A 1 log_forward_target | grep ":Name" | sed -n 's/.*(\([^ ]*\))/\1/p'

multiple results possible

cpmiquerybin object "" network_objects "name='$firewall_name'" | sed -n -e '/:send_logs_to/,/:self_log_server/ p' | grep -E ":Name" | sed -n 's/.*(\([^ ]*\))/\1/p' | tr '\n' ' '

cpmiquerybin object "" network_objects "name='$FIREWALL_NAME'" | sed -n -e '/backup_log_servers/,/:send_alerts_to/ p'| grep -E ":Name" | sed -n 's/.*(\([^ ]*\))/\1/p' | tr '\n' ' '