Debian 8: can’t get ClamAV to listen on TCP 3310

clamavdebian-jessietcp

I am trying to get Clamav-daemon running on a Debian 8 system so that it will listen on TCP port 3310. I have done the following:

aptitude install clamav-daemon

Then modified /etc/clamav/clamd.conf so that it now has the following at the top:

# Added by me
TCPSocket 3310
TCPAddr localhost
# Already existed
LocalSocket /var/run/clamav/clamd.ctl
FixStaleSocket true
LocalSocketGroup clamav
LocalSocketMode 666

Restarted the service using service clamav-daemon restart.

I am finding that netstat -tap | grep clam is not returning anything. Running ps aux | grep clam returns:

clamav   18559 11.4 10.3 649212 399604 ?       Ssl  14:38   0:15 /usr/sbin/clamd --foreground=true

There is an autogenerated file /etc/systemd/system/clamav-daemon.socket.d/extend.conf that contains:

[Socket]
ListenStream=
SocketUser=clamav
ListenStream=/var/run/clamav/clamd.ctl
SocketGroup=clamav
SocketMode=666

The only thing I can see in the logs is:

TCP: No tcp AF_INET/AF_INET6 SOCK_STREAM socket received from systemd

Does anyone know why I may be having trouble getting ClamAV to run on TCP:3310?

Best Answer

simply running

dpkg-reconfigure clamav-daemon

and choosing TCP socket and required port and interface ip (can be any) will get this working properly . You can accept defaults for all other values or specify them.