Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to log iptables?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
padukes
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 232

PostPosted: Tue Jan 20, 2004 6:24 pm    Post subject: how to log iptables? Reply with quote

Hi all,

I have a bunch of lines in my firewall similar to:
Code:
iptables -A INPUT -j LOG --log-prefix "INPUT: " --log-level err

The problem is that I would like to force the ipatbles log to go into a single file that only iptables uses. Right now the above line gets picked up by err.log and syslog

Any suggestions?
Thanks,
P
Back to top
View user's profile Send private message
linuxkrn
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2003
Posts: 140
Location: Denver,Colorado

PostPosted: Tue Jan 20, 2004 10:42 pm    Post subject: ULOG Reply with quote

LOG is only used for syslog.


Look at ULOG (user log)

you will need to compile in support for ULOG and emerge ulogd (app-admin/ulogd)
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Wed Jan 21, 2004 10:45 am    Post subject: Reply with quote

Or you could configure your system logger to do it's job the way you want it and put what you want where you want it.
Back to top
View user's profile Send private message
linuxkrn
Tux's lil' helper
Tux's lil' helper


Joined: 13 Oct 2003
Posts: 140
Location: Denver,Colorado

PostPosted: Wed Jan 21, 2004 4:26 pm    Post subject: You can't Reply with quote

You cannot since iptables is part of the kernel. And unless you want to change all kernel level logs you're out of luck. That's why ULOG was written.
Back to top
View user's profile Send private message
To
Veteran
Veteran


Joined: 12 Apr 2003
Posts: 1145
Location: Coimbra, Portugal

PostPosted: Wed Jan 21, 2004 4:37 pm    Post subject: Reply with quote

right now your iptables log goes to /var/log/kern
you do a grep by "INPUT:" you will see what was log into it.
linuxkrn and fleed allready explain what you can do.
I use syslog-ng to log into a diferent file.


_________________

------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum