• Categorias
  • Recente
  • Tags
  • Popular
  • Usuários
  • Pesquisar
  • Cadastrar
  • Login
Netgate Discussion Forum
  • Categorias
  • Recente
  • Tags
  • Popular
  • Usuários
  • Pesquisar
  • Cadastrar
  • Login

Tons sshguard log entries and its not enabled

General pfSense Questions
9
67
35.6k
Carregando Mais Posts
  • Mais Antigo para Mais Recente
  • Mais Recente para Mais Antigo
  • Mais Votados
Responder
  • Responder como tópico
Entre para responder
Este tópico foi deletado. Apenas usuários com privilégios de moderação de tópico podem vê-lo.
  • S
    stephenw10 Netgate Administrator
    última edição por 8 de jul. de 2022, 20:43

    In some systems the CPU required to compress the logs when rotates can become significant. It's worth disabling the compression if that's the case.

    J 1 Resposta Última resposta 8 de jul. de 2022, 20:55 Responder Citar 1
    • J
      johnpoz LAYER 8 Global Moderator @stephenw10
      última edição por 8 de jul. de 2022, 20:55

      @stephenw10 said in Tons sshguard log entries and its not enabled:

      It's worth disabling the compression if that's the case.

      Yeah I would turn that off, especially if your only going to keep 6 logs, and they at most could be 1M..

      Also if your on zfs believe its recommended not to compress them because zfs is already compressing, etc.

      Now if you were say logging files were set for say 100M and storing lots of them rotated, and you were tight on space compression might make sense.

      If your logging remotely - would it be possible to just disable local logging? There is an option for that I believe.

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      G 1 Resposta Última resposta 11 de jul. de 2022, 12:54 Responder Citar 0
      • G
        geovaneg @johnpoz
        última edição por 11 de jul. de 2022, 12:54

        @johnpoz @stephenw10

        Good morning guys.

        I've never had any CPU problems with this machine. It is a VM hosted on VMWare with good hardware features.

        My file system is UFS and I don't intend to change that now.

        I don't know if there is an option to disable logs locally. Even if there is, I have no intention of doing that, because we usually do a daily overview of the system logs, via the web console, to assess the latest events and the overall health of the system. Remote logs are primarily intended for audits.

        Talking to you, I decided to implement some of your suggestions:

        • I kept disabled the log packets matched from the default block rules in the ruleset to reduce the amount of system logs. It is worth remembering that these logs were enabled in version 2.5.1 and I didn't experience any issues;
        • I increased the size of the log files to 10 MB;
        • Even though I didn't have any CPU problems, I disabled file compression. CPU is never too much 😉 ;
        • As the local logs don't interest me much, I reduced the retention to only 4 files in the log rotation.

        Result:

        All this is giving me less than an hour of peace, without the "sshguard" generating restart logs.
        The main drawback of this is that it can fill the system logs page on the web interface with this filth and distract me from some really important event during my daily inspections.

        -rw------- 1 root wheel 5554233 Jul 11 09:53 filter.log
        -rw------- 1 root wheel 10558634 Jul 11 09:43 filter.log.0
        -rw------- 1 root wheel 10289157 Jul 11 09:19 filter.log.1
        -rw------- 1 root wheel 10304545 Jul 11 08:47 filter.log.2
        -rw------- 1 root wheel 10279009 Jul 11 07:40 filter.log.3

        Thank you for your suggestions and if you have any more they are welcome.

        Thanks

        Geovane

        J 1 Resposta Última resposta 11 de jul. de 2022, 12:57 Responder Citar 0
        • J
          johnpoz LAYER 8 Global Moderator @geovaneg
          última edição por johnpoz 7 de nov. de 2022, 12:58 11 de jul. de 2022, 12:57

          @geovaneg said in Tons sshguard log entries and its not enabled:

          because we usually do a daily overview of the system logs,

          You mean a last 16 minutes or so overview ;) Well your other logs could be longer I guess.. Just the one that cycles ever 2 minutes is pretty useless..

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          G 1 Resposta Última resposta 11 de jul. de 2022, 13:00 Responder Citar 0
          • G
            geovaneg @johnpoz
            última edição por 11 de jul. de 2022, 13:00

            Good Morning @johnpoz !

            Firewall logs are not mixed with system logs in the web interface.

            J 1 Resposta Última resposta 11 de jul. de 2022, 13:15 Responder Citar 0
            • J
              johnpoz LAYER 8 Global Moderator @geovaneg
              última edição por 11 de jul. de 2022, 13:15

              @geovaneg yeah - it was my morning before coffee attempt at humor ;) heheh

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.7.2, 24.11

              1 Resposta Última resposta Responder Citar 1
              • S
                stephenw10 Netgate Administrator
                última edição por 11 de jul. de 2022, 13:20

                Right now your only options there are larger logs and/or log less. You could probably go to 100MB files for the filter log easily. I have seen users with log file set in the GB. I would not recommend that though!

                G 1 Resposta Última resposta 11 de jul. de 2022, 13:28 Responder Citar 1
                • G
                  geovaneg @stephenw10
                  última edição por 11 de jul. de 2022, 13:28

                  Hi @stephenw10

                  Let's try an ideal combination of the two.
                  But for today I'll just follow the behavior.

                  Thanks.

                  Geovane

                  1 Resposta Última resposta Responder Citar 0
                  • G
                    geovaneg
                    última edição por 11 de jul. de 2022, 13:37

                    Change of plans:

                    My quiet time dropped to less than 20 minutes in the last rotation, with the arrival of users on the wifi network.

                    I am changing the size of the log files to 100MB and the retention to 2 files.

                    1 Resposta Última resposta Responder Citar 0
                    • G
                      geovaneg
                      última edição por 13 de jul. de 2022, 13:43

                      Good morning gentlemen,

                      Thanks to you, we are evolving towards a satisfactory configuration.
                      I was looking for logs to disable and I noticed that the squid access logs are being written locally to the /var/log/nginx.log file and also to the /var/squid/logs/access.log folder.
                      Do you know if there's a way to solve this without affecting the sending to the remote server?
                      Note: I have the LightSquid package installed as well.

                      Thanks.

                      1 Resposta Última resposta Responder Citar 0
                      • S
                        stephenw10 Netgate Administrator
                        última edição por 13 de jul. de 2022, 16:34

                        Hmm, nothing I'm aware of but I've never tried to solve that before. You mean prevent Squid writing to the nginx log? You certainly need local logging for LightSquid to work.

                        G 1 Resposta Última resposta 14 de jul. de 2022, 14:23 Responder Citar 1
                        • G
                          geovaneg @stephenw10
                          última edição por 14 de jul. de 2022, 14:23

                          @stephenw10

                          Good Morning,

                          Yes, LightSquid uses log files from the "/var/squid/logs" folder. I reduced the space used by changing the retention of logs in the squid from 30 to 3 files.
                          Regarding the same logs that go to "/var/log/nginx.log" it seems that they are sent remotely to syslog, so there's not much to do there.

                          1 Resposta Última resposta Responder Citar 0
                          • G
                            geovaneg
                            última edição por 14 de jul. de 2022, 14:41

                            Sirs,

                            Thanks again for the suggestions.
                            I believe that we have reached a suitable configuration for our case.

                            I'll report the actions in case anyone finds this useful in the future:

                            PfSense 2.6.0 - FW/GW/Proxy wifi network approx 1300 daily users.
                            Logs are sent remotely for auditing purposes. Lots of filter logs!

                            Our final configuration to avoid "sshguard" spam looked like this:

                            • We increased log file size to 100MB;
                            • To avoid excessive disk consumption, retention has been changed to only two files in "log settings";

                            -rw------- 1 root wheel 97239550 Jul 14 11:35 filter.log
                            -rw------- 1 root wheel 102682474 Jul 13 16:16 filter.log.0
                            -rw------- 1 root wheel 102697059 Jul 13 11:31 filter.log.1

                            • To avoid the risk of unnecessary CPU consumption, log compression was disabled (UFS);
                            • We disabled the log packets matched from the default block rules in the ruleset to reduce the amount of system logs;
                            • We reviewed the other firewall rules and kept the logs strictly necessary;
                            • Also to avoid space consumption, squid log retention has been reduced from 30 to 3 files.

                            Thanks,

                            Geovane

                            1 Resposta Última resposta Responder Citar 1
                            • M Mixka referenced this topic on 7 de ago. de 2022, 21:42
                            • M Mixka referenced this topic on 7 de ago. de 2022, 21:44
                            • M Mixka referenced this topic on 7 de ago. de 2022, 21:44
                            • N
                              noplan
                              última edição por 24 de jan. de 2023, 09:23

                              ok run into same thing ...
                              gonna have a look into this

                              2.6CE

                              brNP

                              1 Resposta Última resposta Responder Citar 0
                              • P pst referenced this topic on 14 de abr. de 2024, 09:24
                              • S sammiorelli referenced this topic on 31 de jul. de 2024, 21:20
                              63 de 67
                              • Primeiro post
                                63/67
                                Último post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.