First of all, your question isn't a Perl question. It's a Linux question, and you're far more likely to get a useful answer on a Linux or a Linux networking forum than you will be getting here.
Having said that, I don't think iptables has anything build in that does a callback. Depending on what you're defending against, you could place a wrapper around the various /sbin/iptables* programs; replace said programs with ones you wrote yourself, or hack the kernel.
But again, there's nothing Perl specific in either the question, or the answer. | [reply] [d/l] |
You could potentially have a perl script that is executed every X minutes by cron (or that loops and sleeps) and compares the current set of rules to the last-known set to detect differences.
| [reply] |
thanks for your replies guys, all good suggestions although i need something that will trigger immediately rather than polling at regular intervals. I wouldnt know where to start with hacking the linux kernel! I've found a few iptables modules on cpan, might see if i can use those.
| [reply] |
| [reply] |
thanks for that, I'll look into it.
Paul
| [reply] |