EFW Support

Support => General Support => Topic started by: zizoux on Tuesday 07 February 2012, 12:48:57 am



Title: Contentfilter update not working
Post by: zizoux on Tuesday 07 February 2012, 12:48:57 am
Hi,
schedule or force the update of the contentfilter is not working; I always receive "restart".

Thanks


Title: Re: Contentfilter update not working
Post by: endianupdate on Wednesday 08 February 2012, 08:32:05 am
You did not say which version of EFW you are using, if you have 2.5.0 then I recommend you upgrade to 2.5.1 as many bugs have been fixed in the new version.

On the Contentfilter page under the 'Update' button you should see information such as;

Blacklists last updated: Tue Feb 7 09:55:40 2012
Phrases lists last updated: Tue Feb 7 09:55:40 2012

To update from 2.5.0 to 2.5.1 you must first register a free account with Endian and then enter the 'efw-upgrade' command at the shell after logging in as root, make sure to choose the 'Development' channel (2) otherwise you wll not receive the updated packages. Or you can re-install from the 2.5.1 CD and restore your config.

Hope this helps



Title: Re: Contentfilter update not working
Post by: zizoux on Wednesday 08 February 2012, 11:57:13 am
Sorry I did forgot to mention it is 2.5.1.
Also nothing is displayed next to:

Blacklists last updated:
Phrases lists last updated:

Thanks


Title: Re: Contentfilter update not working
Post by: endianupdate on Thursday 09 February 2012, 04:33:55 am
Enable SSH (System > SSH Access > Enable secure shell access)

Login to the EFW through SSH (Putty on Windows)

Login: root
Password : your root pw

enter the following command to list the files in the contentfilter folder

ls -al /var/signatures/dansguardian/blacklists/

You should see a large list of blacklists e.g. shopping, sports warez etc. so look at the date and time next to each folder, if the contentfilter has been updated the date and time should be recent.

You can run the command 'restartdansguardianlistsupdate -d -f' at the root prompt to force an update.


Title: Re: Contentfilter update not working
Post by: zizoux on Thursday 09 February 2012, 09:59:06 pm
the list is old. Even when manually forcing the update it does not work.



Title: Re: Contentfilter update not working
Post by: endianupdate on Sunday 12 February 2012, 12:38:21 am
Yes it appears that your lists are not updating, ok try this to find out more about the problem

ssh to the EFW

run the following command at the root shell

Code:
restartdansguardianlistsupdate -f -d | tail -f /var/log/endian/jobsengine

You should now see the progress of the list update, comapre with mine below to try to find the problem.

http://pastie.org/3360836 (http://pastie.org/3360836)

Note: I tried pasting the log here but it was too large, so I hope it is ok to include the link.



Title: Re: Contentfilter update not working
Post by: zizoux on Monday 13 February 2012, 08:43:04 pm
kindly find attached the log.
Thanks


Title: Re: Contentfilter update not working
Post by: ruhllatio on Sunday 19 February 2012, 11:37:25 pm
Your Endi is having a problem decompressing the file it downloads.  If I were you, I would connect to the FW via SCP and manually extract and copy the files to the blacklist directory after downloading it directly to your desktop.  Just disable the content filter first and then reboot after you copy the files to make sure.  While it might seem like a pain at first, the last update for Dansguardian weighted rules was Oct 2007.  So you won't have to manually update them very often if ever.

Also, just to make sure, you're not running out of space, right?  I would almost manually try to copy the tar.gz file to the directory through SCP and tar xvzf it to make sure there isn't something wrong with your installed packages.  If you're out of space on that mount, that would cause the decompress error.

Chris


Title: Re: Contentfilter update not working
Post by: mmiat on Friday 01 April 2016, 10:34:38 pm
this is an old post but it was not fixed and I've the same problem:

File "/usr/lib/python2.4/site-packages/endian/job/generic/downloadjob.py", line 472, in post_un_compress
raise Exception("Could not decompress.")
Exception: Could not decompress.

after this, the script remove the tmp folder, so I can't access and decompress manually
someone has fixed it? endian 2.5.1 and I can't update because endian 3 ipsec doesn't work fine


Title: Re: Contentfilter update not working
Post by: mmiat on Wednesday 06 April 2016, 09:21:27 pm
maybe I fixed changing line 459 from:

Code:
ret = system("tar xzf '%s' -C '%sdir' > /tmp/hallo" % (url["tmp_file"], url["tmp_file"]))

to:

Code:
ret = system("tar xzf '%s' -C '%sdir' > /tmp/hallo")

but I don't why and what the symbol % means in python


Title: Re: Contentfilter update not working
Post by: mmiat on Monday 11 April 2016, 06:41:50 pm
I've substituted:

Code:
                    if url["url"].endswith(".zip") or\
                            url["tmp_file"].endswith(".zip"):
                        ret = system("unzip -d '%sdir' '%s'" % (url["tmp_file"], url["tmp_file"]))
                    elif url["url"].endswith(".tar.gz") \
                            or url["url"].endswith(".tgz")\
                            or url["tmp_file"].endswith(".tar.gz") \
                            or url["tmp_file"].endswith(".tgz"):
                        ret = system("tar xzf '%s' -C '%s'dir > /tmp/hallo"
                                     % (url["tmp_file"], url["tmp_file"]))
                    elif url["url"].endswith(".tar.bz2") \
                            or url["url"].endswith(".tbz2")\
                            or url["tmp_file"].endswith(".tar.bz2") \
                            or url["tmp_file"].endswith(".tbz2"):
                        ret = system("tar jxf '%s' -C '%s'dir"
                                     % (url["tmp_file"], url["tmp_file"]))

with:

Code:
                    if url["url"].endswith(".zip") or\
                            url["tmp_file"].endswith(".zip"):
                        cmd = "unzip -d "+url["tmp_file"]+" "+url["tmp_file"])
                        ret = os.system(cmd)
                    elif url["url"].endswith(".tar.gz") \
                            or url["url"].endswith(".tgz")\
                            or url["tmp_file"].endswith(".tar.gz") \
                            or url["tmp_file"].endswith(".tgz"):
                        cmd = "tar xzf "+url["tmp_file"]+" -C "+url["tmp_file"]+" > /tmp/hallo")
                        ret = os.system(cmd)
                    elif url["url"].endswith(".tar.bz2") \
                            or url["url"].endswith(".tbz2")\
                            or url["tmp_file"].endswith(".tar.bz2") \
                            or url["tmp_file"].endswith(".tbz2"):
                        cmd = "tar jxf "+url["tmp_file"]+" -C "+url["tmp_file"])
                        ret = os.system(cmd)

but if I launch script from shell it seems to work, but if I launch it from web interface it doesn't