[LUGOS] Iptables in logiranje v konzolo

Matej Zerovnik - LeVaK levak at planetq.org
Sat Jun 29 20:19:33 CEST 2002


NA strani od iptables pise:
3.11 How do I stop the LOG target from logging to my console?
You have to configure your syslogd apropriately:
The LOG target logs to facility kern at priority warning (4).
See the syslogd.conf manpage to learn more about facilities and priorities.
By default, all kernel messages at priority more severe than debug (7)
are sent to the console. If you raise that to 4, instead of 7, you will
make the LOG messages no longer appear on the console.
Be aware that this might also suppress other important messages from 
appearing on the console (does not affect syslog).

Kako naj povem syslog-u naj na konzolo meče samo sporočila ki imajo manso 
prioriteto kot 4?

LeVaK
> Danes sem si naložil firewall, ki mi določene povezave logira. Syslog sem
> nastimal tako, da mi logira v /var/log/firewall. Do tukaj vse OK. Moti me
> pa to, da poleg tega da mi logira v file, mi logira tudi na konzolo(samo
> lokalno, tisto ki je trenutno izbrana). Kako to izklopim? Uporabljam
> syslog-ng
>
> syslog-ng.cfg:
> options { long_hostnames(off); sync(0); };
> source src { unix-dgram("/dev/log"); internal(); file("/proc/kmsg"
> log_prefix("kernel: ")); };
>
> destination syslog      { file("/var/log/syslog" owner("root") group("adm")
> perm(0640)); };
> destination mail        { file("/var/log/mail" owner("root") group("adm")
> perm(0640)); };
> destination isdn        { file("/var/log/isdn" owner("root") group("adm")
> perm(0640)); };
> destination call        { file("/var/log/call" owner("root") group("adm")
> perm(0640)); };
> destination firewall    { file("/var/log/firewall" owner("root")
> group("adm") perm(0640)); };
> destination console     { usertty("root"); };
> destination console_all { file("/dev/tty12"); };
> destination console_mail { file("/dev/tty11"); };
>
> filter f_syslog         { not match("IN="); };
> filter f_mail           { facility(mail); };
> filter f_isdn           { facility(local2); };
> filter f_call           { facility(kern) and match("isdn_tty:"); };
> filter f_firewall       { facility(kern) and match("IN="); };
> filter f_emergency      { level(emerg); };
> filter f_console_all    { not match("in.qpopper") and not match("IN=") and
> not facility(auth, authpriv, cron, mail); };
> filter f_console_mail   { facility(mail) and not match("in.qpopper"); };
>
>
>
> log { source(src); filter(f_syslog); destination(syslog); };
> log { source(src); filter(f_mail); destination(mail); };
> log { source(src); filter(f_isdn); destination(isdn); };
> log { source(src); filter(f_call); destination(call); };
> log { source(src); filter(f_firewall); destination(firewall); };
> log { source(src); filter(f_emergency); destination(console); };
> log { source(src); filter(f_console_all); destination(console_all); };
> log { source(src); filter(f_console_mail); destination(console_mail); };
>
> Hvala za pomoč.
>
> LeVaK




More information about the lugos-list mailing list