2

I noticed that there are data in the iptables log that I don't need, so I was wondering if it's possible to change some configuration so that the log has less information, thus reducing the log's size.

I would like log a write only once per IP during some times.

1 Answer 1

1

You can use the hashlimit match. Take a look on the options here.
In order to log once per source ip per hour, you would have, for example :

iptables -A INPUT -m hashlimit --hashlimit-upto 1/hour --hashlimit-mode srcip -j LOG

Basing on your needs, you can use the following modes : srcip, dstip, srcport, dstport and the following length : /sec, /minute, /hour, /day.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .