I am trying to write firewall rules for logging messages but they don't seem to work:
First of all I have added a chain MY_LOG
-N MY_LOG
Then I wrote a rule to jump to MY_LOG chain when I receive a message with destination IP 192.168.1.132, destination port 79 and protocol UDP:
-A INPUT -d 192.168.1.132/32 -p udp -m udp --dport 79 -j MY_LOG
and finally I wrote the rule for the MY_LOG chain:
-A MY_LOG -m mark --mark 0x35 -j NFLOG --nflog-prefix "MY LOG " --nflog-group 30
Then I am sending messages to the correspoding IP and port using Netcat:
nc -u 192.168.1.132 79
but it is not logging anything. What am I doing wrong? Any suggestions?
Thank you very much in advance!