PVEFW NFLOG with custom rules

Mecanik

Well-Known Member
Mar 2, 2017
173
6
58
34
Hi,

I have created my own LOG chains for specific rules added for each guest.

My first question is how can I log in separate log file like PVEFW does per guest? Currently all logs go into the Node's firewall log.

Second question is, how can I format the log output to be similar to PVEFW? At the moment it's like:

0 6 - timestamp :101:tapname:LOG:

When PVEFW is like:

101 2 tapname timestamp policy DROP:

My LOG prefix is as follows:

iptables -A tapname-LOG -m limit --limit 1/sec -j NFLOG --nflog-prefix ':vmid:tapname:LOG: '");

Many thanks