deprec 2.1.8 → 2.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +14 -0
- data/lib/deprec/recipes/bash.rb +28 -0
- data/lib/deprec/recipes/deprec.rb +4 -0
- data/lib/deprec/recipes/network.rb +2 -1
- data/lib/deprec/recipes/ssh.rb +20 -20
- data/lib/deprec/recipes/stunnel.rb +50 -0
- data/lib/deprec/recipes/syslog_ng.rb +53 -0
- data/lib/deprec/recipes/users.rb +31 -60
- data/lib/deprec/recipes_minus_rails.rb +3 -0
- data/lib/deprec/templates/bash/bash_global +36 -0
- data/lib/deprec/templates/ssh/sshd_config.erb +3 -3
- data/lib/deprec/templates/stunnel/stunnel.conf-client +70 -0
- data/lib/deprec/templates/stunnel/stunnel.conf-orig +66 -0
- data/lib/deprec/templates/stunnel/stunnel.conf-server +70 -0
- data/lib/deprec/templates/stunnel/stunnel4 +11 -0
- data/lib/deprec/templates/stunnel/syslog-server.pem +33 -0
- data/lib/deprec/templates/syslog_ng/syslog-ng.conf-client +363 -0
- data/lib/deprec/templates/syslog_ng/syslog-ng.conf-orig +348 -0
- data/lib/deprec/templates/syslog_ng/syslog-ng.conf-server +345 -0
- metadata +16 -4
@@ -0,0 +1,70 @@
|
|
1
|
+
; Sample stunnel configuration file by Michal Trojnara 2002-2006
|
2
|
+
; Some options used here may not be adequate for your particular configuration
|
3
|
+
; Please make sure you understand them (especially the effect of chroot jail)
|
4
|
+
|
5
|
+
; Certificate/key is needed in server mode and optional in client mode
|
6
|
+
; cert = /etc/stunnel/syslog-client.pem
|
7
|
+
; key = /etc/stunnel/syslog-client.pem
|
8
|
+
|
9
|
+
; Protocol version (all, SSLv2, SSLv3, TLSv1)
|
10
|
+
sslVersion = SSLv3
|
11
|
+
|
12
|
+
; Some security enhancements for UNIX systems - comment them out on Win32
|
13
|
+
chroot = /var/lib/stunnel4/
|
14
|
+
setuid = stunnel4
|
15
|
+
setgid = stunnel4
|
16
|
+
; PID is created inside chroot jail
|
17
|
+
pid = /stunnel4.pid
|
18
|
+
|
19
|
+
; Some performance tunings
|
20
|
+
socket = l:TCP_NODELAY=1
|
21
|
+
socket = r:TCP_NODELAY=1
|
22
|
+
;compression = rle
|
23
|
+
|
24
|
+
; Workaround for Eudora bug
|
25
|
+
;options = DONT_INSERT_EMPTY_FRAGMENTS
|
26
|
+
|
27
|
+
; Authentication stuff
|
28
|
+
;verify = 2
|
29
|
+
; Don't forget to c_rehash CApath
|
30
|
+
; CApath is located inside chroot jail
|
31
|
+
;CApath = /certs
|
32
|
+
; It's often easier to use CAfile
|
33
|
+
;CAfile = /etc/stunnel/certs.pem
|
34
|
+
; Don't forget to c_rehash CRLpath
|
35
|
+
; CRLpath is located inside chroot jail
|
36
|
+
;CRLpath = /crls
|
37
|
+
; Alternatively you can use CRLfile
|
38
|
+
;CRLfile = /etc/stunnel/crls.pem
|
39
|
+
|
40
|
+
; Some debugging stuff useful for troubleshooting
|
41
|
+
;debug = 7
|
42
|
+
;output = /var/log/stunnel4/stunnel.log
|
43
|
+
|
44
|
+
; Use it for client mode
|
45
|
+
client = yes
|
46
|
+
|
47
|
+
; Service-level configuration
|
48
|
+
|
49
|
+
[5140]
|
50
|
+
accept = 127.0.0.1:514
|
51
|
+
connect = e10:5140
|
52
|
+
|
53
|
+
;[pop3s]
|
54
|
+
;accept = 995
|
55
|
+
;connect = 110
|
56
|
+
|
57
|
+
;[imaps]
|
58
|
+
;accept = 993
|
59
|
+
;connect = 143
|
60
|
+
|
61
|
+
;[ssmtp]
|
62
|
+
;accept = 465
|
63
|
+
;connect = 25
|
64
|
+
|
65
|
+
;[https]
|
66
|
+
;accept = 443
|
67
|
+
;connect = 80
|
68
|
+
;TIMEOUTclose = 0
|
69
|
+
|
70
|
+
; vim:ft=dosini
|
@@ -0,0 +1,66 @@
|
|
1
|
+
; Sample stunnel configuration file by Michal Trojnara 2002-2006
|
2
|
+
; Some options used here may not be adequate for your particular configuration
|
3
|
+
; Please make sure you understand them (especially the effect of chroot jail)
|
4
|
+
|
5
|
+
; Certificate/key is needed in server mode and optional in client mode
|
6
|
+
cert = /etc/stunnel/mail.pem
|
7
|
+
;key = /etc/stunnel/mail.pem
|
8
|
+
|
9
|
+
; Protocol version (all, SSLv2, SSLv3, TLSv1)
|
10
|
+
sslVersion = SSLv3
|
11
|
+
|
12
|
+
; Some security enhancements for UNIX systems - comment them out on Win32
|
13
|
+
chroot = /var/lib/stunnel4/
|
14
|
+
setuid = stunnel4
|
15
|
+
setgid = stunnel4
|
16
|
+
; PID is created inside chroot jail
|
17
|
+
pid = /stunnel4.pid
|
18
|
+
|
19
|
+
; Some performance tunings
|
20
|
+
socket = l:TCP_NODELAY=1
|
21
|
+
socket = r:TCP_NODELAY=1
|
22
|
+
;compression = rle
|
23
|
+
|
24
|
+
; Workaround for Eudora bug
|
25
|
+
;options = DONT_INSERT_EMPTY_FRAGMENTS
|
26
|
+
|
27
|
+
; Authentication stuff
|
28
|
+
;verify = 2
|
29
|
+
; Don't forget to c_rehash CApath
|
30
|
+
; CApath is located inside chroot jail
|
31
|
+
;CApath = /certs
|
32
|
+
; It's often easier to use CAfile
|
33
|
+
;CAfile = /etc/stunnel/certs.pem
|
34
|
+
; Don't forget to c_rehash CRLpath
|
35
|
+
; CRLpath is located inside chroot jail
|
36
|
+
;CRLpath = /crls
|
37
|
+
; Alternatively you can use CRLfile
|
38
|
+
;CRLfile = /etc/stunnel/crls.pem
|
39
|
+
|
40
|
+
; Some debugging stuff useful for troubleshooting
|
41
|
+
;debug = 7
|
42
|
+
;output = /var/log/stunnel4/stunnel.log
|
43
|
+
|
44
|
+
; Use it for client mode
|
45
|
+
;client = yes
|
46
|
+
|
47
|
+
; Service-level configuration
|
48
|
+
|
49
|
+
[pop3s]
|
50
|
+
accept = 995
|
51
|
+
connect = 110
|
52
|
+
|
53
|
+
[imaps]
|
54
|
+
accept = 993
|
55
|
+
connect = 143
|
56
|
+
|
57
|
+
[ssmtp]
|
58
|
+
accept = 465
|
59
|
+
connect = 25
|
60
|
+
|
61
|
+
;[https]
|
62
|
+
;accept = 443
|
63
|
+
;connect = 80
|
64
|
+
;TIMEOUTclose = 0
|
65
|
+
|
66
|
+
; vim:ft=dosini
|
@@ -0,0 +1,70 @@
|
|
1
|
+
; Sample stunnel configuration file by Michal Trojnara 2002-2006
|
2
|
+
; Some options used here may not be adequate for your particular configuration
|
3
|
+
; Please make sure you understand them (especially the effect of chroot jail)
|
4
|
+
|
5
|
+
; Certificate/key is needed in server mode and optional in client mode
|
6
|
+
cert = /etc/stunnel/syslog-server.pem
|
7
|
+
key = /etc/stunnel/syslog-server.pem
|
8
|
+
|
9
|
+
; Protocol version (all, SSLv2, SSLv3, TLSv1)
|
10
|
+
sslVersion = SSLv3
|
11
|
+
|
12
|
+
; Some security enhancements for UNIX systems - comment them out on Win32
|
13
|
+
chroot = /var/lib/stunnel4/
|
14
|
+
setuid = stunnel4
|
15
|
+
setgid = stunnel4
|
16
|
+
; PID is created inside chroot jail
|
17
|
+
pid = /stunnel4.pid
|
18
|
+
|
19
|
+
; Some performance tunings
|
20
|
+
socket = l:TCP_NODELAY=1
|
21
|
+
socket = r:TCP_NODELAY=1
|
22
|
+
;compression = rle
|
23
|
+
|
24
|
+
; Workaround for Eudora bug
|
25
|
+
;options = DONT_INSERT_EMPTY_FRAGMENTS
|
26
|
+
|
27
|
+
; Authentication stuff
|
28
|
+
;verify = 2
|
29
|
+
; Don't forget to c_rehash CApath
|
30
|
+
; CApath is located inside chroot jail
|
31
|
+
;CApath = /certs
|
32
|
+
; It's often easier to use CAfile
|
33
|
+
;CAfile = /etc/stunnel/certs.pem
|
34
|
+
; Don't forget to c_rehash CRLpath
|
35
|
+
; CRLpath is located inside chroot jail
|
36
|
+
;CRLpath = /crls
|
37
|
+
; Alternatively you can use CRLfile
|
38
|
+
;CRLfile = /etc/stunnel/crls.pem
|
39
|
+
|
40
|
+
; Some debugging stuff useful for troubleshooting
|
41
|
+
;debug = 7
|
42
|
+
;output = /var/log/stunnel4/stunnel.log
|
43
|
+
|
44
|
+
; Use it for client mode
|
45
|
+
;client = yes
|
46
|
+
|
47
|
+
; Service-level configuration
|
48
|
+
|
49
|
+
[syslog]
|
50
|
+
accept = 5001
|
51
|
+
connect = 5000
|
52
|
+
|
53
|
+
;[pop3s]
|
54
|
+
;accept = 995
|
55
|
+
;connect = 110
|
56
|
+
|
57
|
+
;[imaps]
|
58
|
+
;accept = 993
|
59
|
+
;connect = 143
|
60
|
+
|
61
|
+
;[ssmtp]
|
62
|
+
;accept = 465
|
63
|
+
;connect = 25
|
64
|
+
|
65
|
+
;[https]
|
66
|
+
;accept = 443
|
67
|
+
;connect = 80
|
68
|
+
;TIMEOUTclose = 0
|
69
|
+
|
70
|
+
; vim:ft=dosini
|
@@ -0,0 +1,33 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIICXQIBAAKBgQDv1584Ckf7SBhNAvVmEhnMQImYQw3LzGj/qn8gpTsVknxJ1K9S
|
3
|
+
d4A3MiRAMJ/3R2MPzb/298Wx4Ar4QljEavqNTaz9EQfGmCmVnL1mJS3Icin61D+2
|
4
|
+
5R2KaSDA8xIjrQ+953K1MNFKMeBfzgzMm5ctqp2MJo9jDzx2taidTIS77wIDAQAB
|
5
|
+
AoGAWDzcz/JAXzs77YFMJTw9j36i4Iiy16qhaoYgdTM01I/q+AKuacmbOzNQUOlS
|
6
|
+
wNfboyHQIR0w92r0vjcyjzjIamO36n66yavg8cLeSwirFCxWyzUmkKFKVIgHC/ae
|
7
|
+
IK/68VVdCha53pKySMkv31HJXvklmQTbQsKg3gh5PTRvDnECQQD5eNQqogWSp8YR
|
8
|
+
y2PBSrrjgjAJt9BIkoozrL6DlflTZZle/AMOL92z5XgRftEjy737Ao1QzSmoG5u6
|
9
|
+
6zoOARZHAkEA9h5JCwkh/A/ABZlM9+T/ZkxmqFLQuvEEJ5zCgr6LDcjrcG6h3yVS
|
10
|
+
lEoC9Hhm69kPp74NiRYYrkJjpSNctQ55GQJAMrQkKyYTC+OdljBIbhjKM0NakB8T
|
11
|
+
7iwaerY5YnUw34peybdex5ti7BVPef7UcvoN+t5h6nJIbSpvVGZKvl3qMQJBAMIP
|
12
|
+
kTKVaemRFayUev7/3m3wEgXo/tJYVhlR3oEu8v/Ui+gkI5iKmjl4vim7ghO3HEP8
|
13
|
+
dDnCZYWJrX45itDsb4kCQQDiaZ0M3ZFeTP5r/E2C8AazXurX2boakqxDj283laFR
|
14
|
+
Hrq2P+6ZmIZYmcRksb0t1ag/PkUoiESavhUpuerU8v0l
|
15
|
+
-----END RSA PRIVATE KEY-----
|
16
|
+
-----BEGIN CERTIFICATE-----
|
17
|
+
MIIC0zCCAjwCCQD8TuhpAlk4xDANBgkqhkiG9w0BAQUFADCBrTELMAkGA1UEBhMC
|
18
|
+
QVUxEzARBgNVBAgTClNvbWUtU3RhdGUxFjAUBgNVBAcTDVNvbWUtTG9jYWxpdHkx
|
19
|
+
GTAXBgNVBAoTEE9uZSBPcmdhbml6YXRpb24xHjAcBgNVBAsTFU9uZSBPcmdhbml6
|
20
|
+
YXRpb24gVW5pdDESMBAGA1UEAxMJbG9jYWxob3N0MSIwIAYJKoZIhvcNAQkBFhN3
|
21
|
+
ZWJtYXN0ZXJAbG9jYWxob3N0MB4XDTEwMDkwMjA2MzAwM1oXDTEwMTAwMjA2MzAw
|
22
|
+
M1owga0xCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMRYwFAYDVQQH
|
23
|
+
Ew1Tb21lLUxvY2FsaXR5MRkwFwYDVQQKExBPbmUgT3JnYW5pemF0aW9uMR4wHAYD
|
24
|
+
VQQLExVPbmUgT3JnYW5pemF0aW9uIFVuaXQxEjAQBgNVBAMTCWxvY2FsaG9zdDEi
|
25
|
+
MCAGCSqGSIb3DQEJARYTd2VibWFzdGVyQGxvY2FsaG9zdDCBnzANBgkqhkiG9w0B
|
26
|
+
AQEFAAOBjQAwgYkCgYEA79efOApH+0gYTQL1ZhIZzECJmEMNy8xo/6p/IKU7FZJ8
|
27
|
+
SdSvUneANzIkQDCf90djD82/9vfFseAK+EJYxGr6jU2s/REHxpgplZy9ZiUtyHIp
|
28
|
+
+tQ/tuUdimkgwPMSI60PvedytTDRSjHgX84MzJuXLaqdjCaPYw88drWonUyEu+8C
|
29
|
+
AwEAATANBgkqhkiG9w0BAQUFAAOBgQBAfaORw+QL5srjuA8Te54DSeJAdvshwbCf
|
30
|
+
FzDi/NXzNT5tPxqkGeVCvY1kE6dshLe38O00qmnux/Y5xurk7Olawvc13o68fCYZ
|
31
|
+
Zk8tm14cVcOwC60CQi5WM04mFwNPIo6hN0ecSdunxQ+cJP/WgtEzNSKCeUAQVkTD
|
32
|
+
A+aPr38GAw==
|
33
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1,363 @@
|
|
1
|
+
#
|
2
|
+
# Configuration file for syslog-ng under Debian
|
3
|
+
#
|
4
|
+
# attempts at reproducing default syslog behavior
|
5
|
+
|
6
|
+
# the standard syslog levels are (in descending order of priority):
|
7
|
+
# emerg alert crit err warning notice info debug
|
8
|
+
# the aliases "error", "panic", and "warn" are deprecated
|
9
|
+
# the "none" priority found in the original syslogd configuration is
|
10
|
+
# only used in internal messages created by syslogd
|
11
|
+
|
12
|
+
|
13
|
+
######
|
14
|
+
# options
|
15
|
+
|
16
|
+
options {
|
17
|
+
# disable the chained hostname format in logs
|
18
|
+
# (default is enabled)
|
19
|
+
chain_hostnames(0);
|
20
|
+
|
21
|
+
# the time to wait before a died connection is re-established
|
22
|
+
# (default is 60)
|
23
|
+
time_reopen(10);
|
24
|
+
|
25
|
+
# the time to wait before an idle destination file is closed
|
26
|
+
# (default is 60)
|
27
|
+
time_reap(360);
|
28
|
+
|
29
|
+
# the number of lines buffered before written to file
|
30
|
+
# you might want to increase this if your disk isn't catching with
|
31
|
+
# all the log messages you get or if you want less disk activity
|
32
|
+
# (say on a laptop)
|
33
|
+
# (default is 0)
|
34
|
+
#sync(0);
|
35
|
+
|
36
|
+
# the number of lines fitting in the output queue
|
37
|
+
log_fifo_size(2048);
|
38
|
+
|
39
|
+
# enable or disable directory creation for destination files
|
40
|
+
create_dirs(yes);
|
41
|
+
|
42
|
+
# default owner, group, and permissions for log files
|
43
|
+
# (defaults are 0, 0, 0600)
|
44
|
+
#owner(root);
|
45
|
+
group(adm);
|
46
|
+
perm(0640);
|
47
|
+
|
48
|
+
# default owner, group, and permissions for created directories
|
49
|
+
# (defaults are 0, 0, 0700)
|
50
|
+
#dir_owner(root);
|
51
|
+
#dir_group(root);
|
52
|
+
dir_perm(0755);
|
53
|
+
|
54
|
+
# enable or disable DNS usage
|
55
|
+
# syslog-ng blocks on DNS queries, so enabling DNS may lead to
|
56
|
+
# a Denial of Service attack
|
57
|
+
# (default is yes)
|
58
|
+
use_dns(no);
|
59
|
+
|
60
|
+
# maximum length of message in bytes
|
61
|
+
# this is only limited by the program listening on the /dev/log Unix
|
62
|
+
# socket, glibc can handle arbitrary length log messages, but -- for
|
63
|
+
# example -- syslogd accepts only 1024 bytes
|
64
|
+
# (default is 2048)
|
65
|
+
#log_msg_size(2048);
|
66
|
+
|
67
|
+
#Disable statistic log messages.
|
68
|
+
stats_freq(0);
|
69
|
+
|
70
|
+
# Some program send log messages through a private implementation.
|
71
|
+
# and sometimes that implementation is bad. If this happen syslog-ng
|
72
|
+
# may recognise the program name as hostname. Whit this option
|
73
|
+
# we tell the syslog-ng that if a hostname match this regexp than that
|
74
|
+
# is not a real hostname.
|
75
|
+
bad_hostname("^gconfd$");
|
76
|
+
};
|
77
|
+
|
78
|
+
|
79
|
+
######
|
80
|
+
# sources
|
81
|
+
|
82
|
+
# all known message sources
|
83
|
+
source s_all {
|
84
|
+
# message generated by Syslog-NG
|
85
|
+
internal();
|
86
|
+
# standard Linux log source (this is the default place for the syslog()
|
87
|
+
# function to send logs to)
|
88
|
+
unix-stream("/dev/log");
|
89
|
+
# messages from the kernel
|
90
|
+
file("/proc/kmsg" log_prefix("kernel: "));
|
91
|
+
# use the following line if you want to receive remote UDP logging messages
|
92
|
+
# (this is equivalent to the "-r" syslogd flag)
|
93
|
+
udp();
|
94
|
+
};
|
95
|
+
|
96
|
+
|
97
|
+
######
|
98
|
+
# destinations
|
99
|
+
|
100
|
+
<% if syslog_ng_loghost_name and syslog_ng_loghost_name.to_s != '' %>
|
101
|
+
destination loghost { tcp("<%= syslog_ng_loghost_name %>" port (<%= syslog_ng_loghost_port %>)); };
|
102
|
+
<% end %>
|
103
|
+
|
104
|
+
# some standard log files
|
105
|
+
destination df_auth { file("/var/log/auth.log"); };
|
106
|
+
destination df_syslog { file("/var/log/syslog"); };
|
107
|
+
destination df_cron { file("/var/log/cron.log"); };
|
108
|
+
destination df_daemon { file("/var/log/daemon.log"); };
|
109
|
+
destination df_kern { file("/var/log/kern.log"); };
|
110
|
+
destination df_lpr { file("/var/log/lpr.log"); };
|
111
|
+
destination df_mail { file("/var/log/mail.log"); };
|
112
|
+
destination df_user { file("/var/log/user.log"); };
|
113
|
+
destination df_uucp { file("/var/log/uucp.log"); };
|
114
|
+
|
115
|
+
# these files are meant for the mail system log files
|
116
|
+
# and provide re-usable destinations for {mail,cron,...}.info,
|
117
|
+
# {mail,cron,...}.notice, etc.
|
118
|
+
destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
|
119
|
+
destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
|
120
|
+
destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
|
121
|
+
destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
|
122
|
+
destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
|
123
|
+
|
124
|
+
# these files are meant for the news system, and are kept separated
|
125
|
+
# because they should be owned by "news" instead of "root"
|
126
|
+
destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
|
127
|
+
destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
|
128
|
+
destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
|
129
|
+
|
130
|
+
# some more classical and useful files found in standard syslog configurations
|
131
|
+
destination df_debug { file("/var/log/debug"); };
|
132
|
+
destination df_messages { file("/var/log/messages"); };
|
133
|
+
|
134
|
+
# pipes
|
135
|
+
# a console to view log messages under X
|
136
|
+
destination dp_xconsole { pipe("/dev/xconsole"); };
|
137
|
+
|
138
|
+
# consoles
|
139
|
+
# this will send messages to everyone logged in
|
140
|
+
destination du_all { usertty("*"); };
|
141
|
+
|
142
|
+
|
143
|
+
######
|
144
|
+
# filters
|
145
|
+
|
146
|
+
# all messages from the auth and authpriv facilities
|
147
|
+
filter f_auth { facility(auth, authpriv); };
|
148
|
+
|
149
|
+
# all messages except from the auth and authpriv facilities
|
150
|
+
filter f_syslog { not facility(auth, authpriv); };
|
151
|
+
|
152
|
+
# respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
|
153
|
+
# and uucp facilities
|
154
|
+
filter f_cron { facility(cron); };
|
155
|
+
filter f_daemon { facility(daemon); };
|
156
|
+
filter f_kern { facility(kern); };
|
157
|
+
filter f_lpr { facility(lpr); };
|
158
|
+
filter f_mail { facility(mail); };
|
159
|
+
filter f_news { facility(news); };
|
160
|
+
filter f_user { facility(user); };
|
161
|
+
filter f_uucp { facility(uucp); };
|
162
|
+
|
163
|
+
# some filters to select messages of priority greater or equal to info, warn,
|
164
|
+
# and err
|
165
|
+
# (equivalents of syslogd's *.info, *.warn, and *.err)
|
166
|
+
filter f_at_least_info { level(info..emerg); };
|
167
|
+
filter f_at_least_notice { level(notice..emerg); };
|
168
|
+
filter f_at_least_warn { level(warn..emerg); };
|
169
|
+
filter f_at_least_err { level(err..emerg); };
|
170
|
+
filter f_at_least_crit { level(crit..emerg); };
|
171
|
+
|
172
|
+
# all messages of priority debug not coming from the auth, authpriv, news, and
|
173
|
+
# mail facilities
|
174
|
+
filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
|
175
|
+
|
176
|
+
# all messages of info, notice, or warn priority not coming form the auth,
|
177
|
+
# authpriv, cron, daemon, mail, and news facilities
|
178
|
+
filter f_messages {
|
179
|
+
level(info,notice,warn)
|
180
|
+
and not facility(auth,authpriv,cron,daemon,mail,news);
|
181
|
+
};
|
182
|
+
|
183
|
+
# messages with priority emerg
|
184
|
+
filter f_emerg { level(emerg); };
|
185
|
+
|
186
|
+
# complex filter for messages usually sent to the xconsole
|
187
|
+
filter f_xconsole {
|
188
|
+
facility(daemon,mail)
|
189
|
+
or level(debug,info,notice,warn)
|
190
|
+
or (facility(news)
|
191
|
+
and level(crit,err,notice));
|
192
|
+
};
|
193
|
+
|
194
|
+
|
195
|
+
######
|
196
|
+
# logs
|
197
|
+
# order matters if you use "flags(final);" to mark the end of processing in a
|
198
|
+
# "log" statement
|
199
|
+
|
200
|
+
# these rules provide the same behavior as the commented original syslogd rules
|
201
|
+
|
202
|
+
|
203
|
+
<% if syslog_ng_loghost_name and syslog_ng_loghost_name.to_s != '' %>
|
204
|
+
# Send to loghost
|
205
|
+
log {
|
206
|
+
source(s_all);
|
207
|
+
# filter(notdebug);
|
208
|
+
destination(loghost);
|
209
|
+
};
|
210
|
+
<% end %>
|
211
|
+
|
212
|
+
|
213
|
+
# auth,authpriv.* /var/log/auth.log
|
214
|
+
log {
|
215
|
+
source(s_all);
|
216
|
+
filter(f_auth);
|
217
|
+
destination(df_auth);
|
218
|
+
};
|
219
|
+
|
220
|
+
# *.*;auth,authpriv.none -/var/log/syslog
|
221
|
+
log {
|
222
|
+
source(s_all);
|
223
|
+
filter(f_syslog);
|
224
|
+
destination(df_syslog);
|
225
|
+
};
|
226
|
+
|
227
|
+
# this is commented out in the default syslog.conf
|
228
|
+
# cron.* /var/log/cron.log
|
229
|
+
#log {
|
230
|
+
# source(s_all);
|
231
|
+
# filter(f_cron);
|
232
|
+
# destination(df_cron);
|
233
|
+
#};
|
234
|
+
|
235
|
+
# daemon.* -/var/log/daemon.log
|
236
|
+
log {
|
237
|
+
source(s_all);
|
238
|
+
filter(f_daemon);
|
239
|
+
destination(df_daemon);
|
240
|
+
};
|
241
|
+
|
242
|
+
# kern.* -/var/log/kern.log
|
243
|
+
log {
|
244
|
+
source(s_all);
|
245
|
+
filter(f_kern);
|
246
|
+
destination(df_kern);
|
247
|
+
};
|
248
|
+
|
249
|
+
# lpr.* -/var/log/lpr.log
|
250
|
+
log {
|
251
|
+
source(s_all);
|
252
|
+
filter(f_lpr);
|
253
|
+
destination(df_lpr);
|
254
|
+
};
|
255
|
+
|
256
|
+
# mail.* -/var/log/mail.log
|
257
|
+
log {
|
258
|
+
source(s_all);
|
259
|
+
filter(f_mail);
|
260
|
+
destination(df_mail);
|
261
|
+
};
|
262
|
+
|
263
|
+
# user.* -/var/log/user.log
|
264
|
+
log {
|
265
|
+
source(s_all);
|
266
|
+
filter(f_user);
|
267
|
+
destination(df_user);
|
268
|
+
};
|
269
|
+
|
270
|
+
# uucp.* /var/log/uucp.log
|
271
|
+
log {
|
272
|
+
source(s_all);
|
273
|
+
filter(f_uucp);
|
274
|
+
destination(df_uucp);
|
275
|
+
};
|
276
|
+
|
277
|
+
# mail.info -/var/log/mail.info
|
278
|
+
log {
|
279
|
+
source(s_all);
|
280
|
+
filter(f_mail);
|
281
|
+
filter(f_at_least_info);
|
282
|
+
destination(df_facility_dot_info);
|
283
|
+
};
|
284
|
+
|
285
|
+
# mail.warn -/var/log/mail.warn
|
286
|
+
log {
|
287
|
+
source(s_all);
|
288
|
+
filter(f_mail);
|
289
|
+
filter(f_at_least_warn);
|
290
|
+
destination(df_facility_dot_warn);
|
291
|
+
};
|
292
|
+
|
293
|
+
# mail.err /var/log/mail.err
|
294
|
+
log {
|
295
|
+
source(s_all);
|
296
|
+
filter(f_mail);
|
297
|
+
filter(f_at_least_err);
|
298
|
+
destination(df_facility_dot_err);
|
299
|
+
};
|
300
|
+
|
301
|
+
# news.crit /var/log/news/news.crit
|
302
|
+
log {
|
303
|
+
source(s_all);
|
304
|
+
filter(f_news);
|
305
|
+
filter(f_at_least_crit);
|
306
|
+
destination(df_news_dot_crit);
|
307
|
+
};
|
308
|
+
|
309
|
+
# news.err /var/log/news/news.err
|
310
|
+
log {
|
311
|
+
source(s_all);
|
312
|
+
filter(f_news);
|
313
|
+
filter(f_at_least_err);
|
314
|
+
destination(df_news_dot_err);
|
315
|
+
};
|
316
|
+
|
317
|
+
# news.notice /var/log/news/news.notice
|
318
|
+
log {
|
319
|
+
source(s_all);
|
320
|
+
filter(f_news);
|
321
|
+
filter(f_at_least_notice);
|
322
|
+
destination(df_news_dot_notice);
|
323
|
+
};
|
324
|
+
|
325
|
+
|
326
|
+
# *.=debug;\
|
327
|
+
# auth,authpriv.none;\
|
328
|
+
# news.none;mail.none -/var/log/debug
|
329
|
+
log {
|
330
|
+
source(s_all);
|
331
|
+
filter(f_debug);
|
332
|
+
destination(df_debug);
|
333
|
+
};
|
334
|
+
|
335
|
+
|
336
|
+
# *.=info;*.=notice;*.=warn;\
|
337
|
+
# auth,authpriv.none;\
|
338
|
+
# cron,daemon.none;\
|
339
|
+
# mail,news.none -/var/log/messages
|
340
|
+
log {
|
341
|
+
source(s_all);
|
342
|
+
filter(f_messages);
|
343
|
+
destination(df_messages);
|
344
|
+
};
|
345
|
+
|
346
|
+
# *.emerg *
|
347
|
+
log {
|
348
|
+
source(s_all);
|
349
|
+
filter(f_emerg);
|
350
|
+
destination(du_all);
|
351
|
+
};
|
352
|
+
|
353
|
+
|
354
|
+
# daemon.*;mail.*;\
|
355
|
+
# news.crit;news.err;news.notice;\
|
356
|
+
# *.=debug;*.=info;\
|
357
|
+
# *.=notice;*.=warn |/dev/xconsole
|
358
|
+
log {
|
359
|
+
source(s_all);
|
360
|
+
filter(f_xconsole);
|
361
|
+
destination(dp_xconsole);
|
362
|
+
};
|
363
|
+
|