Skip to contentSkip to conversation

IPTABLES: How to NOT display MAC addr in log files

DISCUSSION John Brown 2 participants 2 messages Jun 25, 2011

lore
Share & tools
lore

John Brown

author
#0 lore raw

Hi,

How do I prevent IPTABLES from sending the MAC address data to a log file.

Otherwords I don't wan the MAC=00:25....... data. Its useless to me and wastes a ton of space in the log files.

Jun 25 13:15:16 infodeli kernel: LOGDROP--IN=eth0 OUT=

MAC=00:25:90:01:34:ec:00:09:44:02:2c:0a:08:00 SRC=xxx.XXX.xxx.xxx DST=yyy.yyy.yyy.yyy LEN=92 TOS=0x00 PREC=0x00 TTL=61 ID=23777 PROTO=UDP SPT=3001 DPT=15029 LEN=72

Many thanks in advance

#1 lore raw

Hello,

Quoted 7 lines · John Brown

Hi,

How do I prevent IPTABLES from sending the MAC address data to a log file.

Otherwords I don't wan the MAC=00:25....... data. Its useless to me and wastes a ton of space in the log files.

Quoted 6 lines
Jun 25 13:15:16 infodeli kernel: LOGDROP--IN=eth0 OUT=

MAC=00:25:90:01:34:ec:00:09:44:02:2c:0a:08:00 SRC=xxx.XXX.xxx.xxx DST=yyy.yyy.yyy.yyy LEN=92 TOS=0x00 PREC=0x00 TTL=61 ID=23777 PROTO=UDP SPT=3001 DPT=15029 LEN=72

Many thanks in advance

You can fix the thing in your syslog. For example, in rsyslog;
http://www.rsyslog.com/doc/property_replacer.html

If you are using the LOG target, there is nothing to do except patcking kernel.
If you are using ULOG or NFLOG, you can patch ulogd ou ulogd2 to forget about the MAC part. It should be easy.

BR,

Signature · 2 lines
Eric Leblond 
Blog: http://home.regit.org/