For PSAD to work, I need to add the following iptables rules and enable packet logging :
iptables -A INPUT -j LOG
iptables -A FORWARD -j LOG
ip6tables -A INPUT -j LOG
ip6tables -A FORWARD -j LOG
I use UFW on my system. So, how can I add these rules with UFW?
As the poster above says, you will need to enable logging with the command
But I found that I still needed to add the iptables rules. To do this run each of the commands below (note that you must have
sudo
in front)You need to add extra rules to ufw to satisfy psad. Edit following two files:
To both files listed above, add following lines for psad, at the very end, but before
COMMIT
Next restart ufw
and then check if it worked with
That's it. Read more tips and tricks on how to configure PSAD with UFW
You just enable logging.
Like darronz mentioned you still have to add iptable rules. As you are using ufw the easiest way to create persistent rules would be to edit
/etc/ufw/before.rules
and/etc/ufw/before6.rules
and add the following linesat the end, but before the
COMMIT
.