• Using clamd in stream mode

    From Vincent Coen@2:250/1 to All on Fri Jul 19 15:19:14 2024
    Hello All!

    Please Help



    I have been trying to get this to work since upgrading mga v8 to v9 last year without success as access to the port is refused.

    Has any one have this work and if so can you provide the clamd.conf file so I can compare mine and likewise the settings in /etc/service if not showing the defaults :

    dyna-access 3310/tcp # Dyna Access
    dyna-access 3310/udp # Dyna Access

    tfido 60177/tcp # Ifmail
    tfido 60177/udp # Ifmail
    fido 60179/tcp # Ifmail
    fido 60179/udp # Ifmail

    There may well be other setting files that need updating but I have forgotten what ones.

    My clamd conf lines that relate are :

    PidFile /var/run/clamav/clamd.pid

    TemporaryDirectory /home/system-jobs/tmp
    LocalSocket /var/lib/clamav/clamd.socket
    FixStaleSocket yes

    TCPSocket 3310
    TCPAddr 127.0.0.1
    #TCPAddr localhost
    # here I have tried both settings (one at a time) but should be the same as far as I know.

    as for the test :

    ssh localhost -p 3310
    ssh: connect to host localhost port 3310: Connection refused

    ssh 127.0.0.0 -p 3310
    ssh: connect to host 127.0.0.0 port 3310: Connection refused

    I do NOT run any Doors but do run apache for a web interface at applewoodbbs.linkpc.net
    .

    Log /var/log/clamd.log shows it is running but with these .

    Using systemadm shows that these are running :
    clamav-daemon.service
    clamav-daemon.socket
    clamav-freshclam.service

    Doing a ps aux | grep clam produces :

    clamav 1770582 0.0 0.0 103752 14976 ? SLs Jul07 0:09 /usr/bin/freshclam -d --foreground=true
    clamav 1770616 0.0 8.3 1576280 1353088 ? Ssl Jul07 4:50 /usr/sbin/clamd --foreground=true
    vince 3034322 0.0 0.0 14368 2432 pts/4 S+ 15:28 0:00 less /etc/clamd.conf

    I do not know how to check what processes are using port 3310

    I have run out of ideas, can any one help ?

    Vincent

    --- Mageia Linux v8 X64/Mbse v1.0.8.8/GoldED+/LNX 1.1.5-b20180707
    * Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)
  • From Andrew Leary@1:320/219 to Vincent Coen on Sat Jul 20 05:51:00 2024
    Hello Vincent!

    19 Jul 24 15:19, you wrote to all:

    I have been trying to get this to work since upgrading mga v8 to v9
    last year without success as access to the port is refused.

    Has any one have this work and if so can you provide the clamd.conf
    file so I can compare mine and likewise the settings in /etc/service
    if not showing the defaults :

    dyna-access 3310/tcp # Dyna Access
    dyna-access 3310/udp # Dyna Access

    I don't have any entries in /etc/services for port 3310.

    tfido 60177/tcp # Ifmail
    tfido 60177/udp # Ifmail
    fido 60179/tcp # Ifmail
    fido 60179/udp # Ifmail

    There may well be other setting files that need updating but I have forgotten what ones.

    My clamd conf lines that relate are :

    PidFile /var/run/clamav/clamd.pid

    TemporaryDirectory /home/system-jobs/tmp
    LocalSocket /var/lib/clamav/clamd.socket

    I have LocalSocket /var/run/clamav/clamd.socket on both of my Linux systems.

    FixStaleSocket yes

    TCPSocket 3310
    TCPAddr 127.0.0.1
    #TCPAddr localhost
    # here I have tried both settings (one at a time) but should be the
    same as far as I know.

    I have TCPAddr localhost here.

    as for the test :

    ssh localhost -p 3310
    ssh: connect to host localhost port 3310: Connection refused

    I used telnet to connect to mine. It connects, and then disconnects with an UNKNOWN COMMAND message when I hit ENTER.

    ssh 127.0.0.0 -p 3310
    ssh: connect to host 127.0.0.0 port 3310: Connection refused

    This should be 127.0.0.1 I'm thinking.

    I do NOT run any Doors but do run apache for a web interface at applewoodbbs.linkpc.net
    .

    Log /var/log/clamd.log shows it is running but with these .

    Using systemadm shows that these are running :
    clamav-daemon.service
    clamav-daemon.socket
    clamav-freshclam.service

    Doing a ps aux | grep clam produces :

    clamav 1770582 0.0 0.0 103752 14976 ? SLs Jul07 0:09 /usr/bin/freshclam -d --foreground=true
    clamav 1770616 0.0 8.3 1576280 1353088 ? Ssl Jul07 4:50 /usr/sbin/clamd --foreground=true

    My startup script for clamav does not use the --foreground switch for either clamd or freshclam.

    vince 3034322 0.0 0.0 14368 2432 pts/4 S+ 15:28 0:00
    less /etc/clamd.conf

    This was just you viewing your clamd.conf ...

    Try removing --foreground=true from your command lines in the startup scripts, and then see if telnet will connect to port 3310.

    Andrew

    --- GoldED+/LNX 1.1.5-b20240209
    * Origin: Phoenix BBS * phoenix.bnbbbs.net (1:320/219)