IPtables logs, coming to *tty and in dmesg
Hi GURUS,
I have configured iptables to log all incoming packets in a separate file at /var/log location. which is working fine, but the problem is : --The logs are displayed to all terminal , dmesg along with the actual file (i.e /var/log/firewall.log) My syslog contains : ##DUMP FIREWALL LOG : Added by Firewall Script kern.warn /var/log/firewall.log kern.info /var/log/firewall.log I come to know about dmesg LEVEL , using which , firewall messages can be avoided on dmesg, but have no idea about how to use it. So it will be great help if any one can help me in fixing this issue (with dmesg /or any other way), also if possible , provide me some link , so that I can get full information about these Dmesg LEVELS. (what are the different level and how to use it ??). After googling around, i tried to fix this by changing the /proc/sys/kernel/printk value. FYI, my system current printk value is "3 4 1 7 " I have no idea , what these value stands for , but it's not able to save my dmesg problem. Thanks in advance for your suggestions. |
Quote:
|
Thanks for your suggestion but still i am not able to fix it and need help !
Problem is when ever I try to enable log option (with level warn and redirect it to file in syslog.conf [as keren.warn filename]), it start logging to file as well as on screen/terminal, due to which my system accessibility get suffered. Is there any way to fix it , so that log msg go only to mentioned file not to screen or dmesg. I am in dark and need some light to fix it. Thanks for your help in advance alok |
Please post what you tried (actual commands) and contents of syslog.conf?
|
HI,
Below are the steps I followed to log iprules; -- Enable iptables log by : iptables -I INPUT 1 -p tcp -s x.x.x.x -i eth0 -j LOG --log-prefix CH-IN: ALL tcp packets --log-level warn --Setup syslog to log this to file at /var/log/firewall.log : vi /etc/syslog.conf ; kern.warn /var/log/firewall.log kern.info /var/log/firewall.log kern.none /dev/console But still the log message are at console along with dmesg and firewall.log --alok |
All times are GMT -5. The time now is 10:36 PM. |