This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nabil BENDAFI
committed
Feb 18, 2019
1 parent
b6c2646
commit abc6d9e
Showing
3 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Syslog-ng configuration files | ||
|
||
Stormshield products send logs using different RFC standards. This _Syslog-ng_ configuration file is used to address every cases, since [Logstash](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-syslog.html) _syslog_ input plugin only supports [RFC3164](https://www.ietf.org/rfc/rfc3164.txt) | ||
|
||
## Installation instructions | ||
- Copy `syslog-stormshield-configuration.conf` file in your _Syslog-ng_ configuration path ( Default: _/etc/syslog-ng/conf.d/_) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
@define allow-config-dups 1 | ||
@define MAX_CONNECTIONS 10 | ||
@define LOG_IW_SIZE 10000 | ||
options { | ||
log_fifo_size(`LOG_IW_SIZE`); | ||
}; | ||
|
||
########### | ||
# Sources # | ||
########### | ||
source s_svc_syslog_rfc3164_udp { | ||
network(port(514) | ||
transport("udp") | ||
max-connections(`MAX_CONNECTIONS`)); | ||
}; | ||
source s_svc_syslog_rfc5424_tcp { | ||
syslog( | ||
port(601) | ||
transport("tcp") | ||
max-connections(`MAX_CONNECTIONS`) | ||
log-iw-size(`LOG_IW_SIZE`) | ||
); | ||
}; | ||
|
||
########### | ||
# Filters # | ||
########### | ||
filter f_svc_sns { | ||
match("\"?id\"?=\"?firewall\"?" value("MSG")); | ||
}; | ||
filter f_svc_sns_legacy { | ||
match("\"?id\"?=\"?firewall\"?" value("PROGRAM")); | ||
}; | ||
filter f_svc_ses { | ||
match("\"?id\"?=\"?endpoint\"?" value("MSGHDR")); | ||
}; | ||
filter f_svc_sds { | ||
match("\"?id\"?=\"?datasecurity\"?" value("MSG")); | ||
}; | ||
filter f_svc_sdmc { | ||
match("\"?id\"?=\"?sdmc\"?" value("MSG")); | ||
}; | ||
|
||
############# | ||
# Templates # | ||
############# | ||
template t_svc_stormshield_format { | ||
template("$MSG\n"); | ||
template_escape(no); | ||
}; | ||
template t_svc_ses_format { | ||
template("$PROGRAM $MSG\n"); | ||
template_escape(no); | ||
}; | ||
template t_svc_sns_legacy { | ||
template("$PROGRAM $MSG\n"); | ||
template_escape(no); | ||
}; | ||
|
||
################ | ||
# Destinations # | ||
################ | ||
destination d_svc_logstash { | ||
tcp("127.0.0.1" port(5000)); | ||
}; | ||
|
||
log { | ||
source(s_svc_syslog_rfc3164_udp); | ||
source(s_svc_syslog_rfc5424_tcp); | ||
log { | ||
filter(f_svc_sns); | ||
destination(d_svc_logstash); | ||
}; | ||
log { | ||
filter(f_svc_sns_legacy); | ||
destination(d_svc_logstash); | ||
}; | ||
log { | ||
filter(f_svc_ses); | ||
destination(d_svc_logstash); | ||
}; | ||
log { | ||
filter(f_svc_sds); | ||
destination(d_svc_logstash); | ||
}; | ||
log { | ||
filter(f_svc_sdmc); | ||
destination(d_svc_logstash); | ||
}; | ||
}; |