Page 1 of 1

PSAD and LOG

Posted: Tue Mar 03, 2015 4:39 pm
by sinklar
Hello,

Does the firewall in Vesta accept LOG rules?
I plan to use PSAD which requires these rules:

Code: Select all

-A INPUT -j LOG
-A FORWARD -j LOG

Re: PSAD and LOG

Posted: Tue Mar 03, 2015 10:22 pm
by drMacFaulty
sinklar wrote:Hello,

Does the firewall in Vesta accept LOG rules?
I plan to use PSAD which requires these rules:

Code: Select all

-A INPUT -j LOG
-A FORWARD -j LOG
Not via the GUI they don't, but there is another way which I'll explain tomorrow to you, otherwise vesta resets your rules when you alter something.

Stay tuned (not on a pc atm and too lazy to type on cell :P)

Re: PSAD and LOG

Posted: Sat Mar 07, 2015 5:15 pm
by drMacFaulty
drMacFaulty wrote:
sinklar wrote:Hello,

Does the firewall in Vesta accept LOG rules?
I plan to use PSAD which requires these rules:

Code: Select all

-A INPUT -j LOG
-A FORWARD -j LOG
Not via the GUI they don't, but there is another way which I'll explain tomorrow to you, otherwise vesta resets your rules when you alter something.

Stay tuned (not on a pc atm and too lazy to type on cell :P)
Ok, finally have a moment to post this code. Put it as the first firewall rule (code below). After you've done that you can see it in VestaCP and change another rule there and then revert that rule (put old value back). Then run iptables -L and see whether LOG is still there. Then you're done ;)
CODEShow

Code: Select all

# /usr/local/vesta/data/firewall/rules.conf
# Adjust the date and time.
RULE='1' ACTION='LOG' PROTOCOL='ALL' PORT='0' IP='0.0.0.0/0' COMMENT='IPS' SUSPENDED='no' TIME='21:26:18' DATE='2015-02-23'