Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Dansguardian package for 2.0

    Scheduled Pinned Locked Moved pfSense Packages
    492 Posts 51 Posters 472.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tesna
      last edited by

      @marcelloc:

      You may need to remove havp.

      Dansguardian package uses the same user applied to clamav conf but I did not tested with havp installed.

      I've removed havp, reinstall dansguardian but no luck. Finally I managed to get it working though. I need to modify /usr/local/etc/dansguardian/contentscanners/clamdscan.conf file on the UNIX domain socket thing to match with the value located in /usr/local/etc/clamd.conf

      Not sure why the value is different, maybe havp changed it?

      1 Reply Last reply Reply Quote 0
      • D
        dvserg
        last edited by

        Try remove dansguardian and look exists packages from console - pkg_info
        If any clam package exist, you must delete it's manually - pkg_delete full_pkg_name

        Can exist clam AV from havp pkg.

        Then install dansguardian new.

        SquidGuardDoc EN  RU Tutorial
        Localization ru_PFSense

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by

          Not sure why the value is different, maybe havp changed it?

          Maybe. Try uninstalling clamav after havp just like dvserg told you.

          If I have some time this week I'll try to check havp clamav config and make dansguardian compatible to it.

          Treinamentos de Elite: http://sys-squad.com

          Help a community developer! ;D

          1 Reply Last reply Reply Quote 0
          • M
            mschiek01
            last edited by

            I've had this same problem never was able to get it to work.  I think the issue occurs when postfix is installed allong with dansguardian.

            1 Reply Last reply Reply Quote 0
            • marcellocM
              marcelloc
              last edited by

              Hi mschiek01,

              Postfix and dansguardian with clamav can work together, this setup I've tested sucessfully.

              Can you post your pfsense version?
              Did you tried a full clamav uninstall as described on previous post?
              This way I can simulate the problem.

              Treinamentos de Elite: http://sys-squad.com

              Help a community developer! ;D

              1 Reply Last reply Reply Quote 0
              • M
                mschiek01
                last edited by

                2.0.1-RELEASE (i386)

                I did try full uninstall no luck.  I need to take a look and see if havp and all its components were removed on the deinstall.

                1 Reply Last reply Reply Quote 0
                • M
                  mschiek01
                  last edited by

                  @marcelloc:

                  Hi mschiek01,

                  Postfix and dansguardian with clamav can work together, this setup I've tested sucessfully.

                  Can you post your pfsense version?
                  Did you tried a full clamav uninstall as described on previous post?
                  This way I can simulate the problem.

                  I did get it to work.  Here is what I did:
                  Uninstall, postfix, dansguardian & mailscanner
                  reinstall HAVP
                  uninstall HAVP & deleted havp user
                  reinstall postfix, mailscanner, dansguardian

                  Trying to just pkg_delete the clamv packages was showing errors concerning the packaged deletion.

                  Stopped working again with "error connecting to clam d socket"

                  1 Reply Last reply Reply Quote 0
                  • marcellocM
                    marcelloc
                    last edited by

                    The way I did:

                    Clean install
                    Postfix
                    Mailscanner
                    Dansguardian

                    I'll do it again this week to test.

                    Treinamentos de Elite: http://sys-squad.com

                    Help a community developer! ;D

                    1 Reply Last reply Reply Quote 0
                    • C
                      Cino
                      last edited by

                      still have a lot more testing with SSL man-in-middle but when I try to access https sites, i'm getting the danguardian denied page "Certificate supplied by server was not valid"

                      still have to check logs and read the docs from danguardian site on this feature.

                      1 Reply Last reply Reply Quote 0
                      • marcellocM
                        marcelloc
                        last edited by

                        I'm on the same point.

                        I did not found anything usefull on internet.

                        This is a most wanted experimental and non documented feature ever. :(

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • T
                          tesna
                          last edited by

                          @mschiek01:

                          @marcelloc:

                          Hi mschiek01,

                          Postfix and dansguardian with clamav can work together, this setup I've tested sucessfully.

                          Can you post your pfsense version?
                          Did you tried a full clamav uninstall as described on previous post?
                          This way I can simulate the problem.

                          I did get it to work.  Here is what I did:
                          Uninstall, postfix, dansguardian & mailscanner
                          reinstall HAVP
                          uninstall HAVP & deleted havp user
                          reinstall postfix, mailscanner, dansguardian

                          Trying to just pkg_delete the clamv packages was showing errors concerning the packaged deletion.

                          Stopped working again with "error connecting to clam d socket"

                          check the config file make sure it points to the right clamd socket. In this case on mine the on the /usr/local/etc/clamd.conf clamd socket is located on /var/run/clamd.sock

                          So I edited the /usr/local/etc/dansguardian/contentscanners/clamdscan.conf to make sure it points to the right location: In mine I change it to:

                          
                          # edit this to match the location of your ClamD UNIX domain socket
                          clamdudsfile = '/var/run/clamd.sock'
                          
                          

                          Now the dansguardian + av content scanner is working great! I've test it to download eicar test file signature and it detects the signature.

                          However, I have additional question. I've set the proxy server to dansguardian port in the browser config file on http, ftp and https. But it seems dansguardian does not scan https protocol. Is that normal?

                          1 Reply Last reply Reply Quote 0
                          • marcellocM
                            marcelloc
                            last edited by

                            It will scan https url and domains only until whe find a way to create "valid" men-on-the-middle certs.
                            The point is That dansguardian 2.12 is the first release with full ssl filtering support But it is on experimental stage and not documented at all. We could compile it with ssl and also patched dansguardian-devel ports to help bsd users to get it working.

                            If you want to test or reach the same point we(cino and me) are, go on system cert manager, create a CA certificate and a server certificate using this ca. On dansguardian, apply these certificares on second tab and finally enable ssl filtering option on groups tab.

                            Treinamentos de Elite: http://sys-squad.com

                            Help a community developer! ;D

                            1 Reply Last reply Reply Quote 0
                            • S
                              svtlightning
                              last edited by

                              Are there any issues getting this to work with a carp interface. Works fine with LAN but trying to get it working with CARP.

                              1 Reply Last reply Reply Quote 0
                              • marcellocM
                                marcelloc
                                last edited by

                                listen dansguardian on loopback and create a nat rule from your virtual ip to 127.0.0.1

                                Treinamentos de Elite: http://sys-squad.com

                                Help a community developer! ;D

                                1 Reply Last reply Reply Quote 0
                                • T
                                  tesna
                                  last edited by

                                  @marcelloc:

                                  It will scan https url and domains only until whe find a way to create "valid" men-on-the-middle certs.
                                  The point is That dansguardian 2.12 is the first release with full ssl filtering support But it is on experimental stage and not documented at all. We could compile it with ssl and also patched dansguardian-devel ports to help bsd users to get it working.

                                  If you want to test or reach the same point we(cino and me) are, go on system cert manager, create a CA certificate and a server certificate using this ca. On dansguardian, apply these certificares on second tab and finally enable ssl filtering option on groups tab.

                                  I have same problem with Cino mentioned when using SSL filtering, the dansguardian itself reject/block the site since the certificate is not valid. I thought the client's browser will warns the user about invalid certificates (I've used astaro gateway before) then the user can choose to continue. Maybe since this very experimental stage it does not work well yet.

                                  On another note, a little bit out of topic. I've used proxy.pac and wpad.dat to autoconfigure the proxy settings on the client computers. I put proxy.pac, wpad.dat and wpad.da on local webserver on the network and assign wpad dns name to that particular webserver. This is working fine for most of the computers, most computers connect though the proxy automatically.

                                  However it seems not all client using the proxy settings so when I block outgoing port 80 some client just can't connect to the internet. I've checked the settings and I'm sure all settings is the same (Auto detect settings are ticked). So I did NAT to redirect outgoing port 80 from the internal network to the dansguardian port and its working fine and making sure all clients browse thru the filter.

                                  But with this method I have little trouble bypassing the filter for some host. On the pfsense squid configuration menu it has the option to enable transparent proxy and select exception list of IP are permitted to bypassing the proxy. I'm not sure how to do it on using NAT rule.

                                  EDIT: one more thing. If using wpad/proxy.pac config it will bypass captive portal. Users can browse the internet but can't check emails on outlook since the ports are blocked by the captive portal, cannot login to captive portal too since it nevers shows the login page. If I did not use proxy/wpad thing (connect directly and use port redirection (transparent) the captive portal is working properly). I guess this is the drawback using wpad/proxy auto config.

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    mschiek01
                                    last edited by

                                    @tesna:

                                    @mschiek01:

                                    @marcelloc:

                                    Hi mschiek01,

                                    Postfix and dansguardian with clamav can work together, this setup I've tested sucessfully.

                                    Can you post your pfsense version?
                                    Did you tried a full clamav uninstall as described on previous post?
                                    This way I can simulate the problem.

                                    I did get it to work.  Here is what I did:
                                    Uninstall, postfix, dansguardian & mailscanner
                                    reinstall HAVP
                                    uninstall HAVP & deleted havp user
                                    reinstall postfix, mailscanner, dansguardian

                                    Trying to just pkg_delete the clamv packages was showing errors concerning the packaged deletion.

                                    Stopped working again with "error connecting to clam d socket"

                                    check the config file make sure it points to the right clamd socket. In this case on mine the on the /usr/local/etc/clamd.conf clamd socket is located on /var/run/clamd.sock

                                    So I edited the /usr/local/etc/dansguardian/contentscanners/clamdscan.conf to make sure it points to the right location: In mine I change it to:

                                    
                                    # edit this to match the location of your ClamD UNIX domain socket
                                    clamdudsfile = '/var/run/clamd.sock'
                                    
                                    

                                    Thanks my configuration was the same.  I made the change and it is working now.

                                    Now the dansguardian + av content scanner is working great! I've test it to download eicar test file signature and it detects the signature.

                                    However, I have additional question. I've set the proxy server to dansguardian port in the browser config file on http, ftp and https. But it seems dansguardian does not scan https protocol. Is that normal?

                                    1 Reply Last reply Reply Quote 0
                                    • C
                                      Cino
                                      last edited by

                                      think there may be a permission issue with clamav… It doesnt start when i reboot the box. This is what I get when I manually start the process:

                                      
                                      ./clamav-clamd start
                                      mkdir: /var/run/clamav: File exists
                                      Starting clamav_clamd.
                                      ERROR: Can't open /var/log/clamav/clamd.log in append mode (check permissions!).
                                      ERROR: Can't initialize the internal logger
                                      ./clamav-clamd: WARNING: failed to start clamav_clamd
                                      
                                      

                                      the permissions for the files are 0644, wheel/root
                                      when i change it to 777, its able to start

                                      1 Reply Last reply Reply Quote 0
                                      • marcellocM
                                        marcelloc
                                        last edited by

                                        Cino,

                                        If you apply dansguardian config after reboot it fixes the permission?

                                        Treinamentos de Elite: http://sys-squad.com

                                        Help a community developer! ;D

                                        1 Reply Last reply Reply Quote 0
                                        • C
                                          Cino
                                          last edited by

                                          @marcelloc:

                                          Cino,

                                          If you apply dansguardian config after reboot it fixes the permission?

                                          It has not in the past.. I'll test again but I had to reboot my box yesterday… then i disabled the ssl man-in-middle(would be a apply to dansguardian) and had to manually set the permissions

                                          1 Reply Last reply Reply Quote 0
                                          • marcellocM
                                            marcelloc
                                            last edited by

                                            Ok, I'll check it and socket file location

                                            Treinamentos de Elite: http://sys-squad.com

                                            Help a community developer! ;D

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.