mathjax + gtag

Pages

Tuesday, October 24, 2017

Stop IPTables and Other Kernel Messages From Flooding Your Console

The Problem

Console gets flooded with messages like this:

[1909322.686129] SFW2-INext-ACC-TCP IN=eth0 OUT= MAC=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx SRC=xxx.xxx.xxx.xxx DST=xxx.xxx.xxx.xxx LEN=60 TOS=0x00 PREC=0x00
TTL=39 ID=30338 PROTO=TCP SPT=33453 DPT=22 WINDOW=5840 RES=0x00 SYN URGP=0 OPT (XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)



Solutions

They all rely on something similar to writing to /proc/sys/kernel/printk:

  1. echo "3 4 1 3" > /proc/sys/kernel/printk
  2. $ sysctl -w kernel.printk="3 4 1 3"
  3. $ dmesg -n 4
  4. Create the file /etc/sysctl.d/50-stop-dmesg-flood.conf and put the following line in it: kernel.printk = 3       4       1       3


To check:
  1. $ cat /proc/sys/kernel/printk
  2. $ sysctl kernel.printk

References

No comments:

Post a Comment