Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### adapted from https://blog.webernetz.net/2014/07/24/basic-syslog-ng-installation/
- ##################################################
- options {
- create_dirs(yes);
- owner(USERNAME);
- group(USERGROUP);
- perm(0640);
- dir_owner(USERNAME);
- dir_group(USERGROUP);
- dir_perm(0750);
- };
- ##################################################
- source s_udp {
- network (
- ip-protocol(6)
- transport("udp")
- port(514)
- );
- network (
- transport("udp")
- port(514)
- );
- };
- #Template for a new firewall in the firewalls.conf file
- #Entries to be changed: NAMEOFTHEFIREWALL and IPOFTHEFIREWALL
- ##################################################
- filter f_NAMEOFTHEFIREWALL {
- host("IPOFTHEFIREWALL");
- };
- destination d_NAMEOFTHEFIREWALL {
- file("/var/log/firewalls/NAMEOFTHEFIREWALL/$YEAR/$MONTH/$YEAR-$MONTH-$DAY.NAMEOFTHEFIREWALL.log");
- };
- log {
- source(s_udp);
- filter(f_NAMEOFTHEFIREWALL);
- destination(d_NAMEOFTHEFIREWALL);
- };
- ##################################################
- destination d_host-specific {
- file("/var/log/firewalls/$HOST/$YEAR/$MONTH/$HOST-$YEAR-$MONTH-$DAY.log");
- };
- log {
- source(s_udp);
- destination(d_host-specific);
- };
Advertisement
Add Comment
Please, Sign In to add comment