iptables patchen und die Funktion LOG

Post Reply
Message
Author
sourcehunter
Posts: 5
Joined: 30. Aug 2001 18:58

iptables patchen und die Funktion LOG

#1 Post by sourcehunter »

Hi,
so nun nochmal ne Frage zu iptables!
Was bzw wie muss/kann ich iptables patchen? Möchte den Patch (ftp-security2.patch) installieren! Hab schon zig Pages gelesen aber niergends steht da was vom patchen!
Und mein zweites Prob ist die Funktion -j LOG!!!
Angenommen ich erstelle eine Regel, etwa so:
iptables -A INPUT -s adresse -p tcp --dport 22 -j LOG --log-level warning --log-prefix "SSH-Activities"
Ich bekomme dann die Warnings immer nur auf die Console!!! Nur wenn der Server mal 7 Tage läuft und ich ihn mir dann erst anschaue wird warscheinlich die Meldung schon wieder vom Screen verschwunden sein!!! Die müsste also geloggt werden!! Hab schon mit dem syslog-Dämon rumgemacht, der loggt mir aber auch net warnings oder errors von iptables!
Wie kann ich mir die Warnings usw also in eine Datei schreiben lassen? Am besten in eine Datei die nur für Warnings von der Firewall kommen!
cYa SourceHunter

Rossi

Re: iptables patchen und die Funktion LOG

#2 Post by Rossi »

Zeigt doch mal Deine syslog.conf. LOG schreibt in "kern" ...

also

kern.* /var/log/kern.log

sollte es machen. Wahrscheinlich hast Du du irgendwo sowas wie:

*.warning /dev/console

stehen

sourcehunter
Posts: 5
Joined: 30. Aug 2001 18:58

Re: iptables patchen und die Funktion LOG

#3 Post by sourcehunter »

# /etc/syslog.conf
# For info about the format of this file, see "man syslog.conf" (the BSD man
# page), and /usr/doc/sysklogd/README.linux.
#

*.=info;*.=notice /usr/adm/messages
*.=debug /usr/adm/debug

# We don't log messages of level 'warn'. Why? Because if you're running
# a news site (with INN), each and every article processed generates a
# warning and a disk access. This slows news processing to a crawl.
# If you want to log warnings, you'll need to uncomment this line:
#*.warn /usr/adm/syslog
*.err /usr/adm/syslog
*.warning /var/log/warning.log
kern.* /var/log/kern.log # hab ich eben mal geaddet
#
# This might work instead to log on a remote host:
# * @hostname

So sieht meine Syslog.conf aus!!!
Des kern.* bringt aber auch nix, die Datei wird zwar erstellt aber es wird nix reingeschreiben!
Last edited by sourcehunter on 30. Aug 2001 20:38, edited 1 time in total.

Sebastian Ude

Re: iptables patchen und die Funktion LOG

#4 Post by Sebastian Ude »

@ SourceHunter

Zu dem Patch:

Das steht doch auf <a href="http://netfilter.samba.org/security-fix/index.html" target="_blank"><!--auto-->http://netfilter.samba.org/security-fix ... <!--auto--> wortwörtlich:

<blockquote><hr>Apply patch by cd'ing into your kernel source tree and running:

patch -p1 < /where/you/put/the/patch/ftp-security2.patch<hr></blockquote>

Also noch mal auf Deutsch:

Du gehst nach /usr/src/linux, oder wo immer du das Verzeichnis mit den Kernelquellen liegen hasst, und setzt ein

<blockquote><hr>patch -p1 < /where/you/put/the/patch/ftp-security2.patch<hr></blockquote>

ab, wobei "/where/you/put/the/patch/" natürlich durch das Verzeichnis, wo die Datei "ftp-security2.patch" liegt zu ersetzen wäre.

Nach dem du den Patch gegen den Kernel-Tree gehauen hast, vergiss bitte das Neucompilieren des Kernels nicht - aber ich denke mal, dass du das weisst.

sourcehunter
Posts: 5
Joined: 30. Aug 2001 18:58

Re: iptables patchen und die Funktion LOG

#5 Post by sourcehunter »

Ooooohhhhhh fffuuuckkk des habe ich total übersehen, shit *schäm* hab nur flüchtig die Überschrift gelesen!!! Dafür aber um so öfters den darunter stehenden Text ;)
UUUuuuupppssssaaalllaaa naja thx für den Tip *bg*

Post Reply