Skip to content

Josh's IT-Blog

Information Technology, and other interesting things …

  • Home
  • About
  • Contact
  • Links
  • Home
  • About
  • Contact
  • Links

auto-update Antivirus Essential for Synology NAS behind proxy

  1. Home   »  
  2. auto-update Antivirus Essential for Synology NAS behind proxy

auto-update Antivirus Essential for Synology NAS behind proxy

7. December 201213. December 2012 Burkard JoshStorageTagged Synology

Since DSM 4.1 you can configure proxy service at the Control Panel – Network:

but if you have installed the AntiVirus Essential package, it wouldn’t use this settings to update it’s virus definitions and will fail:

To configure autoupdate for the virus definitions behind a proxy server, you need to configure some settings manualy:

activate ssh on your NAS:

connect to your NAS by SSH and login as root (not as admin!)

create a new script:

vi /var/packages/AntiVirus/target/bin/synoavupdate

change vi to the insert mode by press key i, then insert this lines:

#!/bin/sh
cd /var/packages/AntiVirus/target/engine/clamav/var/lib
rm daily.cvd
export http_proxy="proxy.test.local:8080"
wget http://database.clamav.net/daily.cvd --proxy=on

to change vi to the command mode press ESC key. Save your script by enter :w and leave vi by enter :q.

now you need to make your new script executable:

chmod +x /var/packages/AntiVirus/target/bin/synoavupdate

you can test your script by entering:

/var/packages/AntiVirus/target/bin/synoavupdate

After executing your script, your AV definitions should be uptodate:

To execute your script automaticaly on a reglar base, edit /etc/crontab:

vi /etc/crontab

add the follow lines to the crontab file and save it:

#minute hour    mday    month   wday    who     command
0       0       *       *       6       root    /var/packages/AntiVirus/target/bin/synoavupdate
0       1       *       *       6       root    /var/packages/AntiVirus/target/bin/synoavscan --all

edit the times, so that synoavupdate runs around one hour before synoavscan.

Deactivate automatically updates in your settings:

Don’t forget to deactivate SSH access again.

Post navigation

Previous: network calculations in Excel 2010
Next: Proxy autoconfiguration with WPAD.dat and multiple network adapters

About

Author Image
My name is Josh Burkard.
I'm a DevOps Engineer working with one of Europees largest payroll provider. in my work I have a lot to do with Microsoft server operating systems, System Center, VMware, Microsoft Azure Cloud and other software.
On this site I will write some posts about different technology problems and their solutions.
please note also my tweets and retweets from this area.

Categories

  • General (13)
  • Hardware (9)
    • Network (8)
      • Cisco (2)
    • Storage (2)
  • Hiking (1)
  • Home Assistant (5)
  • Microsoft Azure (1)
    • Automation (1)
  • PowerShell (3)
  • Software (1)
    • Excel (1)
  • System Center (18)
    • SCCM (3)
    • SCDPM (1)
    • SCOM (12)
    • SCSM (1)
    • SMA (1)
  • VMware (8)
  • Windows 2008 R2 (10)
    • Active Directory (7)
  • Windows 2012 R2 (1)
  • Windows 2016 (1)
  • Windows 7 (4)
    • BitLocker (1)
  • WordPress (1)
Proudly powered by WordPress | Theme: goldy-mex by inverstheme.