Hi,
on my old Synology NAS I was able to install a “knock” daemon using entware. I used it to execute a script whenever I knocked on NAS port from my computer.
Now that I’m migrating to my new Terramaster NAS, I would like to do the same thing, but I’m unable to find a way to install knock, let alone entware. I can’t find any app, container or whatever.
Is it possible to install knock in any way? Or is there any other way to obtain the same result as using knock service?
Thanks for your suggestion, but unfortunately ssh is not a practicable solution because it requires manual operations. I need to launch the script from all my devices: PC, android phone, android tablet with just a one click.
However I found a solution!
I put into the NAS a copy of the binary knockd taken from my ubuntu installation. I created the configuration file, a script to execute knockd as a daemon with all the correct parameters, and eventually I inserted a post-init command into the Advanced Settings of TrueNas.
Perhaps I’ll create a feature request to introduce knockd as a standard feature of TrueNas.
At least for the PC that is not true. SSH with public key authentication, invoke from batch or powershell script, no interaction at all, just like your knockd.
I don’t know the context here, but you know, anything you run via midclt locally you can also run remotely via a remote websocket connection using our python API client. Basically the only dependency is python websockets.
There’s no reason to use a hack like port knocking to trigger a script run. You can just move your midclt script to your device and add an API key to it.