Menu

#65 iptables script CIDR support

v7.5.1
closed-accepted
nobody
None
5
2019-07-21
2019-06-12
dan pritts
No

Hi, attaching a small patch to the iptables service script and config file.

It adds support for reporting by CIDR subnet (default /22) instead of by individual remote host IP.

Introduces a runtime dependency on Net::CIDR, but I believe the method I used ("require" instead of "use") means that people who don't use the feature won't fail compilation if the module's not there.

Sample output:

--------------------- iptables firewall Begin ------------------------

Listed by source hosts:
Accepted 1822 packets on interface eth0
From xx.yy.100.0/22 - 1822 packets to tcp(443)

Listed by source hosts:
Dropped 1702 packets on interface eth0
From xx.yy.160.0/22 - 3 packets to tcp(80,443)
From xx.yy.168.0/22 - 7 packets to tcp(443)
From xx.yy.172.0/22 - 5 packets to tcp(80)
From xx.yy.60.0/22 - 3 packets to tcp(443)
From xx.yy.104.0/22 - 1554 packets to tcp(443)
From xx.yy.16.0/22 - 128 packets to tcp(80,443)
From xx.yy.244.0/22 - 2 packets to tcp(443)

If there's a doc file that I missed let me know and i will update it too.

1 Attachments

Discussion

  • Bjorn

    Bjorn - 2019-07-21
    • status: open --> closed-accepted
     
  • Bjorn

    Bjorn - 2019-07-21

    Thanks for submitting the patch; committed to repository.

     

Log in to post a comment.

Auth0 Logo