View previous topic :: View next topic |
Author |
Message |
padukes Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/19253096323f15ae6d11c99.gif)
Joined: 27 Feb 2003 Posts: 232
|
Posted: Tue Jan 20, 2004 6:24 pm Post subject: how to log iptables? |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
linuxkrn Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/54138621417289fa71bae.png)
Joined: 13 Oct 2003 Posts: 140 Location: Denver,Colorado
|
Posted: Tue Jan 20, 2004 10:42 pm Post subject: ULOG |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
fleed l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1800640613415a758ba4ac3.png)
Joined: 28 Aug 2002 Posts: 756 Location: London
|
Posted: Wed Jan 21, 2004 10:45 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
linuxkrn Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/54138621417289fa71bae.png)
Joined: 13 Oct 2003 Posts: 140 Location: Denver,Colorado
|
Posted: Wed Jan 21, 2004 4:26 pm Post subject: You can't |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
To Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/106869468452b5c7dd8e5d.png)
Joined: 12 Apr 2003 Posts: 1145 Location: Coimbra, Portugal
|
Posted: Wed Jan 21, 2004 4:37 pm Post subject: |
|
|
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.
Tó _________________
------------------------------------------------
Linux Gandalf 3.2.35-grsec
Gentoo Base System version 2.2
------------------------------------------------ |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|