Hi all,
Using a bash script on my NAS that is checking if there is connection from my N2:
IFCONN=netstat -an | grep $N2IP | grep "ESTABLISHED" | cut -d':' -f3 | xargs |grep -o '.\{11\}$'
if [ “$IFCONN” = “ESTABLISHED” ]; then
[… and so on]
I see that N2 is periodically establishing connection to my NAS during the night which cause that drives are waking up from hibernation.
My question is why N2 is establishing this connection? Is there a way to detect what trigger that connection? For sure no one is using Kodi during the night
As the solution it might be added to firewall iptable rule a new one which drop outbound connection from N2 to NAS only on NFS ports (I don’t want to drop all outbound connections as I’m using N2 for other purposes as well)
That rule need to be added by cron job at for instance 1:00 AM and removed at 6:00 AM. But I have a problem to create such rule at the moment.
What do you think guys?