Yo, is it possible to detect addition/removal of U...
# linux
m
Yo, is it possible to detect addition/removal of UFW rules on Linux?
c
UFW is a fancy wrapper around iptables for Linux. You could use the Osquery
iptables
, however you will need to instruct Osquery to generate logs for addition/removal of IPtables. osquery config:
Copy code
{
  "schedule": {
    "iptables_monitor": {
      "query": "SELECT * FROM iptables",
      "interval": 60,
      "removed": true
    }
  }
}
m
Oh yep, i think any modification to the iptables rules will triger a remove and add into the table yea? So I can just look for added/removed events on that table in the logs and I can know that iptables has been modified in theory right?
c
Yup but I would test it first
👍 1
m
OFC, thanks