QNAP [QPKG] Qwhitelist app -> Super whitelisting (Qnap Firewall) version 1.6 [14-09-2015]

There you go, the new version 1.2 source code has been sent as a PM to you.

I've also updated to screenshot of the first page to demonstrate the interface
 
Would not be enough to create a script like the one below to add something to cron?

Code:
#!/bin/sh
echo "* 1 * * * /.../qwhitelist.sh" >> /etc/config/crontab
/etc/init.d/crond.sh restart
exit 0
 
Thanks for your input, that looks indeed great

The command should however call the webinterface

So I think the command should use "wget http://localhost:port/index.php?cron=1"

So something like this:

Code:
#!/bin/sh
echo "* 1 * * * wget http://localhost:port/index.php?cron=1" >> /etc/config/crontab
/etc/init.d/crond.sh restart
exit 0

Would that work?

ps:cronweb doesn't work yet on qts 4.2 and I also think that it is better to put it in the app, that way when the user uninstalls the app, it can also remove the cron
 
not the problem to create script, but if user want remove it or change somethin, it may come back on next reboot (or application restart)

;)
 
Can't it be just run at first installation and then inform user how to change it if needed?
 
Here is a script that explains how to add and remove specific single crontab lines using one single command line :

http://blog.fayland.org/2011/10/removeadd-job-to-crontab-by-commandline.html

maybe that might help?
 
The script I posted ensure the line is still there after reboot. Of course a button would be nice!
 
I have just installed the last version to see how it looks like. :)

Just for info, the default port is 10123 if someone want to know (it was not written in the thread) :)

However, I have read somewhere the password, but I cannot find it anymore. Which is it?

EDIT: it was in the first post: Default password: whitelistpassphrase :lol:
 
Version 1.3 is ready

I sent you the update link via PM

This time cron is build in, but when someone wants to remove the pqpkg you need to call the whilelist php file with the get argument ?cron_delete=1
This is needed, because my program cannot anticipate the package removal otherwise.

In all other situations, the script will autocreate the jobs

Default password is blank from now on
 
sorry to be late, just a bit busy due my colleague vacation on Qnap Support, also no time to test it

wish i could go faster, so many QPKG creation pending ...
 
Stéphane,

I just verified v1.150821 but it doesn't contain v1.3 it still contains version 1.2

Can you check the google link from my last pm?

Thanks

btw: I just installed the Release candidate for qts 4.2 and I got this message:

The functionalities of the following apps have been affected by your current firmware:
The following apps will no longer be supported:
Cronweb,QJDK7,Keybox,qposstrgesql,Qodoo,qwhitelist
 
strange,

can you check inside /opt/QwhiteList/QwhiteList

i let the old file in it, and just rename in index.php the latest, let me know

concerning the warning, i am not sure but does your application still work ? i dont see the warning error reason

just hope it didnt turn the NAS in full x64
 
See the screenshot that I'm getting about the error:
qts 4.2 rc1 app changes compatibility warning.png

It's really anoying because I'm getting this pop-up everytime I logon... I cannot dismiss the alert..

About the qwhitelist app:
I checked the directory that you stated, but apart from the index.php there is no other php file, I also noticed that the index.php has a date stamp of 19 august (which was the very first release of the app)
 
Thanks stephane

Now it is ok, the index.php contains the latest version.
I've started testing and noticed that the directory of the index.php -> qchitelist should have a chmod 777 in order to write the config file when a user presses on save.
I've chmodded it via putty and then it saves the config, I also noted that the ipconf.conf is updated, so that part is also validated
I do notice two problems that I should resolve:
1) crontab is not updating because the web user cannot write to the /etc/config/crontab file which is chmod 644, i tried to chmod 777 from within the script but that doesn't work (do you have experience in creating a cron on a qnap?)
2) the whitelist network config is not beeing applied, it seems that I need to restart something in order to apply-> reload the ipsec.conf file