How can iptables run a command or script on a new connection attempt?Requirement:External packet to (server interface eth0) ---> (Server interface eth0) input table detects new packet received on port 22 --> iptables runs a command or scriptMe thinks, so far, for example:iptables -A INPUT -i eth0 -p tcp --dport 22 -s xxx.xxx.xxx.xxx/24 -d xxx.xxx.xxx.xxx/32 -m state --state NEW (then do something here like run a script or command (but how?) ) -j ACCEPTFurther reading from a similar question with two answers:Run shell script based on IPTABLES port access attempt
Have iptables run command/script on new connection attempt
iptables