WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Linux, UNIX, Open Source (http://www.wcm.at/forum/forumdisplay.php?f=13)
-   -   zusätzlicher Text im LOG bei iptables (http://www.wcm.at/forum/showthread.php?t=136154)

robi1a 05.06.2004 14:42

zusätzlicher Text im LOG bei iptables
 
Ich habe mir in meinem SUSE 9.0 eine Firewall aufgebaut und zursätzliche Chains eingefügt. Am Ende jeder Chain hab ich ein Logging und dann ein DROP eingebaut. Im Logfile hätte ich jetzt gerne aus welcher Chain das Packet gedropped wurde. Kann ich den Firewalls-Rules einen bestimmten Text (ein Wort würde schon genügen) einbauen, der dann auch im LOG steht.
Als Beispiel meine LOG_AND_DROP Chain:

# LOG dropped packets to syslog kernel:notice
-A LOG_AND_DROP -j LOG --log-level notice
# DROP all packets
-A LOG_AND_DROP -j DROP

K@sperl 05.06.2004 15:10

Code:

-j LOG --log-prefix "your own text"
man iptables:
Code:

--log-prefix prefix
              Prefix log messages with the specified prefix; up to 29 letters long, and useful for distinguishing messages in the logs.


flinx 05.06.2004 15:10

Nach Konsultation von man iptables würde ich sagen das du das Gewünschte mittels
Zitat:

--log-prefix prefix
Prefix log messages with the specified prefix; up to 29 letters long, and useful for distinguishing messages in the logs.
erreichen könntest. :)

robi1a 05.06.2004 15:20

Ui *rotwerd*, das muss ich wohl irgendwie überlesen haben. Danke, werd das dann gleich mal ausprobieren.


Alle Zeitangaben in WEZ +2. Es ist jetzt 08:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag