where is the iptables log

Ramses

New member
Joined
Jul 4, 2006
Messages
3
when i enter the following line in iptables:

iptables -A INPUT -j LOG --log-prefix "test "

Everything should be logged.
But I can't find any results in a logfile, only in the DMESG. Is there a way to store iptables information to a seperate file instead of the DMESG

------------------
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning prefix `test '

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
------------------

DMESG:

test IN=venet0 OUT= MAC= SRC=89.**.**.** DST=89.**.**.** LEN=100 TOS=0x10 PREC=0x00 TTL=63 ID=19624 DF PROTO=TCP SPT=52741 DPT=22 WINDOW=708 RES=0x00 ACK PSH URGP=0

------------------
 
when i enter the following line in iptables:

iptables -A INPUT -j LOG --log-prefix "test "

Everything should be logged.
But I can't find any results in a logfile, only in the DMESG. Is there a way to store iptables information to a seperate file instead of the DMESG
By default the log file for iptables is: /var/log/messages
But if you wish to use a different log file, edit and add your entry into /etc/syslog.conf file.
 
Hello Andy,

That's what I thought. But the entries are not posted there. The OS type may also be a reason for a different location, I use Fedora core 5 .
But I suspect that directadmin has set a change in the logging location.
Changing the /etc/syslog.conf has no results.
 
Back
Top