CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. Come to CPUG CON 2008 EUROPE in Switzerland on September 8th - 9th!
    Two days full of technical content for Check Point administrators in the beautiful Swiss Alps!
    We already have 52 attendees signed up from 14 countries!
2. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting 8/25, 10/6, 11/3, 12/8, (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8, 7/6, 8/3, 9/7.
3. Corrent S3500 SecureXL Turbocards For Sale - Last Six Remaining - Get Your Spares!
4. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 Platforms > Linux
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2007-03-28
dongliying2 dongliying2 is offline
Junior Member
 
Join Date: 2007-03-07
Posts: 9
Rep Power: 0
dongliying2 has an average reputation (10+)
Default How to config syslog for serureplatform

How to config syslog for serureplatform?
Reply With Quote
  #2 (permalink)  
Old 2007-04-19
dantro dantro is offline
Senior Member
 
Join Date: 2007-02-07
Location: Halle (Saale)
Posts: 228
Rep Power: 2
dantro has an average reputation (10+)
Default Re: How to config syslog for serureplatform

Checkpoint's Firewall-1 does not offer sending its firewall logs to a syslog server - which is especially hurting when a central system already is installed especially to correlate network events. There is a trick though, where you can re-route the logs to a different location: the user-defined alert. We (mis)use the user-defined alert to send a log entry to a local shell script instead of to the log file.

Security and Performance Implications
Firing up a script each and every time a TCP session is established or ended as well as for every packet being dropped can give quite an impact on the firewall performance, depending on hardware and line usage.

Second syslog is not "secured" as the CheckPoint log facility is. It transfers the messages unencrypted and stores them plain text - which might be of consideration.

Remote syslog usually is using UDP - which means log entries can (and probably will) be lost during transfer. Switching to a TCP-based syslog can help with this part.

Implementation & Setup

I assume the firewall is run under a Unix-style operating system. We need a syslog-feeder for this script - and as I usually work under Linux, I am using the "logger" binary that usually is included in a distribution.

If you want to send your logs to a remote syslog server, configure it in /etc/syslog.conf

To set up, copy the script below to a suitable location and adapt it to your needs. Don't forget to mark it executable (chmod 755). Then configure it as the "user-defined alert" in CheckPoint firewall (menu properties/alerts IIRC).

First try wether it is working with a dedicated test rule where you set logging to "user-defined". If it's working fine, you can slowly switch all the rules you want to get logged to. Have an eye on ressource usage when (and after) switching, though...

Code:
#!/bin/sh
#-------------------------------------------------------
# fw1syslog  (c) 2004 volker.tanger@wyae.de - this script is public domain
	
# an identifier for the log
IDTAG="CKPfirewall"
	
# the syslog facility	
# choose one of: auth, authpriv, daemon, security (deprecated synonym for 
#	auth), local0, local1, local2, local3, local4, local5, local6, local7
FACILITY="local5"
	
# severity level: alert, crit, debug, emerg, err, info, notice
LEVEL="notice"	

	
#-------------------------------------------------------
# no config below here
	
fwdate 		= "$1"	## date of the log entry
fwtime 		= "$2"	## time of the log entry
fwaction 	= "$3"	## block / accept / reject
fwLog 		= "$4"	## log type
fwInterface 	= "$5"	## interface on which the packet arrived
fwtype 		= "$6"	##
fwproto1 	= "$7"	## 
fwprotocol 	= "$8"	## protocol used
fwsrc 		= "$9"	## 
fwsource 	= "$10"	## source IP
fwdst 		= "$11"	## 
fwdestination 	= "$12"	## destination IP
fwsrv 		= "$13"	##

logger -p ${FACILITY}.${LEVEL} "${IDTAG}: ${fwaction} from ${fwsource} to ${fwdestination} proto ${fwprotocol}"
All credits go to: http://www.wyae.de/docs/fw1syslog.php


Best regards,
Danny Trommer
CCSA/CCSE/CCSE+
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 11:16.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0