I am trying to log every connection attempt to port 32400 so that I can run a bash script that will send a Wake Up Lan packet to my Plex server if somebody attempt to connect to it.
However, I can't for the life of me understand why iptables is not logging anything... Here's my rule.
iptables -I FORWARD -i br-lan -p tcp --dport 32400 -m conntrack --ctstate NEW -j LOG --log-prefix "PLEX LAN Connection "
I've also tried those ones : #iptables -I FORWARD -p tcp --dport 32400 -m conntrack --ctstate NEW -j LOG --log-prefix "PLEX LAN Connection " #iptables -I INPUT -p tcp -m tcp --dport 32400 -m conntrack --ctstate NEW -j LOG --log-level 1 --log-prefix "PLEX LAN Connection "
Nothing coming up in "logread".
I thought maybe it was iptables that wasn't logging there so I added this rule :
iptables -I INPUT 1 -j LOG
The logread is loaded so it really is logging at that place. I notice however that there's only packet to/from the outside world there and nothing from my LAN.
Is there a LEDE or iptables genius here that can help me?
Here's what I get from the original script.
root@LEDE:~# iptables -I FORWARD -i br0 -p tcp --dport 32400 -m state --state NEW -j LOG --log-prefix "PLEX LAN Connection "
iptables v1.6.1: Couldn't load match `state':No such file or directory