Hi,
I wish to enable the clamd instance on my PMG host to accept remote connections.
I followed the following approach, which is not working unfortunately - thoughts welcome.
I tried as well removing TCPAddr parameter, same outcome.
Thanks for your suggestions.
I wish to enable the clamd instance on my PMG host to accept remote connections.
I followed the following approach, which is not working unfortunately - thoughts welcome.
- Copy the PMG template of clamd.conf to the local template directory
Code:cp /var/lib/pmg/templates/clamd.conf.in /etc/pmg/templates/ - Edit the /etc/pmg/templates/clamd.conf.in, adding:
TCPAddr
TCPSocket 3310
StreamMinPort 30000
StreamMaxPort 32000
It looks like this now:
Code:#Automatically Generated by proxmoxTCPAddr TCPSocket 3310 LocalSocket /var/run/clamav/clamd.ctl FixStaleSocket true User clamav ScanMail true ScanArchive true [% IF pmg.clamav.archiveblockencrypted %] AlertEncrypted true [% ELSE %] AlertEncrypted false [% END %] MaxRecursion [% pmg.clamav.archivemaxrec %] MaxFiles [% pmg.clamav.archivemaxfiles %] MaxFileSize [% pmg.clamav.archivemaxsize %] MaxScanSize [% pmg.clamav.maxscansize %] MaxDirectoryRecursion 15 FollowDirectorySymlinks false FollowFileSymlinks false ReadTimeout 180 MaxThreads 12 MaxConnectionQueueLength 15 StreamMaxLength [% pmg.mail.maxsize %] LogSyslog true LogFacility LOG_LOCAL6 LogClean false LogVerbose false PidFile /var/run/clamav/clamd.pid DatabaseDirectory /var/lib/clamav/ TemporaryDirectory /tmp SelfCheck 3600 Foreground false Debug false ScanPE true ScanOLE2 true ScanHTML true ScanPDF true AlertBrokenExecutables true ExitOnOOM false LeaveTemporaryFiles false AlgorithmicDetection true ScanELF true IdleTimeout 30 PhishingSignatures true PhishingScanURLs true AlertPhishingSSLMismatch false AlertPhishingCloak false DetectPUA false ScanPartialMessages false HeuristicScanPrecedence false [% IF pmg.clamav.maxcccount %] StructuredDataDetection true StructuredMinCreditCardCount [% pmg.clamav.maxcccount %] StructuredMinSSNCount [% pmg.clamav.maxcccount %] [% ELSE %] StructuredDataDetection false [% END %] CommandReadTimeout 5 SendBufTimeout 200 MaxQueue 100 LogFileMaxSize 0 Bytecode true BytecodeSecurity TrustSigned StreamMinPort 30000 StreamMaxPort 32000 - Run command to sync config files and restart services
Code:pmgconfig sync --restart 1 - ClamAV is running, the changes are visible in /etc/clamav/clamd.conf
Code:#Automatically Generated by proxmoxTCPAddr TCPAddr TCPSocket 3310 LocalSocket /var/run/clamav/clamd.ctl FixStaleSocket true User clamav ScanMail true ScanArchive true AlertEncrypted false MaxRecursion 5 MaxFiles 1000 MaxFileSize 25000000 MaxScanSize 100000000 MaxDirectoryRecursion 15 FollowDirectorySymlinks false FollowFileSymlinks false ReadTimeout 180 MaxThreads 12 MaxConnectionQueueLength 15 StreamMaxLength 26214400 LogSyslog true LogFacility LOG_LOCAL6 LogClean false LogVerbose false PidFile /var/run/clamav/clamd.pid DatabaseDirectory /var/lib/clamav/ TemporaryDirectory /tmp SelfCheck 3600 Foreground false Debug false ScanPE true ScanOLE2 true ScanHTML true ScanPDF true AlertBrokenExecutables true ExitOnOOM false LeaveTemporaryFiles false AlgorithmicDetection true ScanELF true IdleTimeout 30 PhishingSignatures true PhishingScanURLs true AlertPhishingSSLMismatch false AlertPhishingCloak false DetectPUA false ScanPartialMessages false HeuristicScanPrecedence false StructuredDataDetection false CommandReadTimeout 5 SendBufTimeout 200 MaxQueue 100 LogFileMaxSize 0 Bytecode true BytecodeSecurity TrustSigned StreamMinPort 30000 StreamMaxPort 32000 - Port 3310 is not listening, netstat returns an empty output
Code:netstat -an | grep 3310
I tried as well removing TCPAddr parameter, same outcome.
Thanks for your suggestions.
Last edited: