* [gentoo-user-de] syslog-ng filtert iptables (nicht)
@ 2005-07-07 18:13 z3rosix
2005-07-07 19:55 ` Dominik Elsbroek
2005-07-08 9:53 ` z3rosix
0 siblings, 2 replies; 4+ messages in thread
From: z3rosix @ 2005-07-07 18:13 UTC (permalink / raw
To: gentoo-user-de
sers,
ich hab ein problem mit syslog-ng. Ich möchte das er meine iptables
drops in ein spezielles file (/var/log/iptables) logt. Dafür markier ich
alle gedropten pakete bei iptables mit "-j LOG --log-prefix "iptables: "
"
Beim syslog-ng hab ich eine entsprechende destination, filter usw.
konfiguriert:
destination iptables { file("/var/log/iptables"); };
filter f_iptables { match("iptables:"); };
log { source(src); filter(f_iptables); destination(iptables); };
aus meiner sicht sieht eigentlich alles gut aus, nur irgendwarum landen
die drops immer noch in "/var/log/kern.log".
ich hab die iptables regel auch schon ganz am anfang hingesetzt, weil
ich gelesen hab das der ja nur einmal logt und dann würde es erklären
warums in "kern.log" landet aber auch wenns ganz am anfang steht klappts
nicht.
Weiß jemand noch rat?
thx im voraus
greetz
alex
--
gentoo-user-de@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user-de] syslog-ng filtert iptables (nicht)
2005-07-07 18:13 [gentoo-user-de] syslog-ng filtert iptables (nicht) z3rosix
@ 2005-07-07 19:55 ` Dominik Elsbroek
2005-07-08 9:53 ` z3rosix
1 sibling, 0 replies; 4+ messages in thread
From: Dominik Elsbroek @ 2005-07-07 19:55 UTC (permalink / raw
To: gentoo-user-de
z3rosix@my-mail.ch wrote:
> sers,
>
> ich hab ein problem mit syslog-ng. Ich möchte das er meine iptables
> drops in ein spezielles file (/var/log/iptables) logt. Dafür markier ich
> alle gedropten pakete bei iptables mit "-j LOG --log-prefix "iptables: "
> "
> Beim syslog-ng hab ich eine entsprechende destination, filter usw.
> konfiguriert:
>
> destination iptables { file("/var/log/iptables"); };
> filter f_iptables { match("iptables:"); };
> log { source(src); filter(f_iptables); destination(iptables); };
>
> aus meiner sicht sieht eigentlich alles gut aus, nur irgendwarum landen
> die drops immer noch in "/var/log/kern.log".
> ich hab die iptables regel auch schon ganz am anfang hingesetzt, weil
> ich gelesen hab das der ja nur einmal logt und dann würde es erklären
> warums in "kern.log" landet aber auch wenns ganz am anfang steht klappts
> nicht.
>
>
> Weiß jemand noch rat?
>
>
> thx im voraus
>
>
> greetz
>
> alex
>
du musst bei dem filter fuer den kern src ein and not match("iptables:")
einbaun, damit der filter nicht die msgs fuer iptables mitnimmt, sondern
wirklich nur die kern src's
Gruss Dominik
--
gentoo-user-de@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user-de] syslog-ng filtert iptables (nicht)
2005-07-07 18:13 [gentoo-user-de] syslog-ng filtert iptables (nicht) z3rosix
2005-07-07 19:55 ` Dominik Elsbroek
@ 2005-07-08 9:53 ` z3rosix
2005-07-08 19:27 ` Dominik Elsbroek
1 sibling, 1 reply; 4+ messages in thread
From: z3rosix @ 2005-07-08 9:53 UTC (permalink / raw
To: gentoo-user-de
Hallo,
alles klar hab selber meinen Fehler gefunden.
Die Sachen die der Kernel meldet gehen ja nicht über /dev/log sondern
über /proc/kmsg, und dafür is bei gentoo eine eigene src konfiguriert:
source src { unix-stream("/dev/log"); internal(); };
source kernsrc { file("/proc/kmsg"); };
D.h. ich musste einfach meine Zeile
log { source(src); filter(f_iptables); destination(iptables); };
nach
log { source(kernsrc); filter(f_iptables); destination(iptables); };
ändern und schon logt er alles nach /var/log/iptables
greetz
alex
On Thu, Jul 07, 2005 at 08:13:55PM +0200, z3rosix@my-mail.ch wrote:
> sers,
>
> ich hab ein problem mit syslog-ng. Ich möchte das er meine iptables
> drops in ein spezielles file (/var/log/iptables) logt. Dafür markier ich
> alle gedropten pakete bei iptables mit "-j LOG --log-prefix "iptables: "
> "
> Beim syslog-ng hab ich eine entsprechende destination, filter usw.
> konfiguriert:
>
> destination iptables { file("/var/log/iptables"); };
> filter f_iptables { match("iptables:"); };
> log { source(src); filter(f_iptables); destination(iptables); };
>
> aus meiner sicht sieht eigentlich alles gut aus, nur irgendwarum landen
> die drops immer noch in "/var/log/kern.log".
> ich hab die iptables regel auch schon ganz am anfang hingesetzt, weil
> ich gelesen hab das der ja nur einmal logt und dann würde es erklären
> warums in "kern.log" landet aber auch wenns ganz am anfang steht klappts
> nicht.
>
>
> Weiß jemand noch rat?
>
>
> thx im voraus
>
>
> greetz
>
> alex
>
> --
> gentoo-user-de@gentoo.org mailing list
--
gentoo-user-de@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user-de] syslog-ng filtert iptables (nicht)
2005-07-08 9:53 ` z3rosix
@ 2005-07-08 19:27 ` Dominik Elsbroek
0 siblings, 0 replies; 4+ messages in thread
From: Dominik Elsbroek @ 2005-07-08 19:27 UTC (permalink / raw
To: gentoo-user-de
hm, ja im grunde schon, ich habe mein syslog und netfilter so
angepasst, dass mir z.B. ausgehende verbindungen in ner seperaten file
gespeichert werden. genauso wie connects auf meinen sshd, verschiedene
scans und invalid packets.
und meinw syslog-ng.conf ist in etwa nach dem sicherheitsleitfaden,
daher meinte ich, dass du bei dem kern src das and match not einbauen
muesstest.
Gruss Dominik
2005/7/8, z3rosix@my-mail.ch <z3rosix@my-mail.ch>:
> Hallo,
>
> alles klar hab selber meinen Fehler gefunden.
> Die Sachen die der Kernel meldet gehen ja nicht über /dev/log sondern
> über /proc/kmsg, und dafür is bei gentoo eine eigene src konfiguriert:
>
> source src { unix-stream("/dev/log"); internal(); };
> source kernsrc { file("/proc/kmsg"); };
>
> D.h. ich musste einfach meine Zeile
> log { source(src); filter(f_iptables); destination(iptables); };
> nach
> log { source(kernsrc); filter(f_iptables); destination(iptables); };
> ändern und schon logt er alles nach /var/log/iptables
>
>
> greetz
>
>
> alex
>
> On Thu, Jul 07, 2005 at 08:13:55PM +0200, z3rosix@my-mail.ch wrote:
> > sers,
> >
> > ich hab ein problem mit syslog-ng. Ich möchte das er meine iptables
> > drops in ein spezielles file (/var/log/iptables) logt. Dafür markier ich
> > alle gedropten pakete bei iptables mit "-j LOG --log-prefix "iptables: "
> > "
> > Beim syslog-ng hab ich eine entsprechende destination, filter usw.
> > konfiguriert:
> >
> > destination iptables { file("/var/log/iptables"); };
> > filter f_iptables { match("iptables:"); };
> > log { source(src); filter(f_iptables); destination(iptables); };
> >
> > aus meiner sicht sieht eigentlich alles gut aus, nur irgendwarum landen
> > die drops immer noch in "/var/log/kern.log".
> > ich hab die iptables regel auch schon ganz am anfang hingesetzt, weil
> > ich gelesen hab das der ja nur einmal logt und dann würde es erklären
> > warums in "kern.log" landet aber auch wenns ganz am anfang steht klappts
> > nicht.
> >
> >
> > Weiß jemand noch rat?
> >
> >
> > thx im voraus
> >
> >
> > greetz
> >
> > alex
> >
> > --
> > gentoo-user-de@gentoo.org mailing list
>
> --
> gentoo-user-de@gentoo.org mailing list
>
>
--
gentoo-user-de@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-08 19:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-07 18:13 [gentoo-user-de] syslog-ng filtert iptables (nicht) z3rosix
2005-07-07 19:55 ` Dominik Elsbroek
2005-07-08 9:53 ` z3rosix
2005-07-08 19:27 ` Dominik Elsbroek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox