Updating rkhunter when behind a proxy

General support questions
Post Reply
fishface
Posts: 27
Joined: 2016/08/02 15:47:42

Updating rkhunter when behind a proxy

Post by fishface » 2017/08/16 15:02:40

Basic server install of CentOS 6.9.

I have rkhunter hunter on the above server which is behind a proxy, if I manually export the proxy and then run rkhunter --update, it works fine, but when run via the cron job it fails, I have tried adding the exported proxy settings to the cron job but it still fails, I also added this to .bashrc and called from the cron job and it failed.

Code: Select all

function setproxy() {
    export {http,https,ftp}_proxy='http://user:password@myproxy.local:80'
}

function unsetproxy() {
    unset {http,https,ftp}_proxy
}
I've tried the WEB_CMD within rkhunter.conf and couldn't get it to work, and after reading this I'm wondering how I'm going to get this work, any help appreciated.
https://sourceforge.net/p/rkhunter/mail ... /33692314/

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Updating rkhunter when behind a proxy

Post by TrevorH » 2017/08/16 16:26:37

What about setting

Code: Select all

http_proxy=your.proxy:port
0 0 * * * /usr/bin/rkhunter --update
or

Code: Select all

0 0 * * * http_proxy=your.proxy:port /usr/bin/rkhunter --update
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

fishface
Posts: 27
Joined: 2016/08/02 15:47:42

Re: Updating rkhunter when behind a proxy

Post by fishface » 2017/08/16 16:41:29

I'm using the script that installed with rkhunter, which is in /etc/cron.daily ( called by cron.d/0daily ) so I thought I could tweak that little and get it working, I'll try your suggestion.

Post Reply