How to start the Snort service with logging enabled?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












I setup snort on Centos server and add as a service. When I use service snortd start command, the log file is created but it is empty. If I use snort -q -l /var/log/snort command, the log file created and filled with logs. What should I do in order to use service snortd start and have the logs work?










share|improve this question



























    up vote
    0
    down vote

    favorite
    1












    I setup snort on Centos server and add as a service. When I use service snortd start command, the log file is created but it is empty. If I use snort -q -l /var/log/snort command, the log file created and filled with logs. What should I do in order to use service snortd start and have the logs work?










    share|improve this question

























      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      I setup snort on Centos server and add as a service. When I use service snortd start command, the log file is created but it is empty. If I use snort -q -l /var/log/snort command, the log file created and filled with logs. What should I do in order to use service snortd start and have the logs work?










      share|improve this question















      I setup snort on Centos server and add as a service. When I use service snortd start command, the log file is created but it is empty. If I use snort -q -l /var/log/snort command, the log file created and filled with logs. What should I do in order to use service snortd start and have the logs work?







      centos logs snort






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 20 '14 at 15:12









      drs

      3,25842757




      3,25842757










      asked Jun 20 '14 at 14:40









      SLYN

      11




      11




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          1
          down vote













          Edit the init script and add -q -l /var/log/snort to snort. Save and restart the service.






          share|improve this answer



























            up vote
            0
            down vote













            You should modify the /etc/sysconfig/snort file as options will be read from there. LOGDIR (-l) is set to /var/log/snort by default.






            share|improve this answer



























              up vote
              0
              down vote













              According to Snort Manual v2.9.11 written under The Snort Project



              To read packets & record them to disc, we need to specify a logging directory that If not specified, by default It is created with name log in current directory. If log directory is not configured in snort, It exits with an error message.



              So, you need to specify the logging directory in the init script while starting the snort itself by typing in :



              ./snort -q -dev -l /path/to/log/file


              Now save the script and restart the service.



              Also, consider giving your time to this Script by markus1982. It would be really helpful.






              share|improve this answer




















                Your Answer







                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "106"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                convertImagesToLinks: false,
                noModals: false,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                 

                draft saved


                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f138285%2fhow-to-start-the-snort-service-with-logging-enabled%23new-answer', 'question_page');

                );

                Post as a guest






























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                1
                down vote













                Edit the init script and add -q -l /var/log/snort to snort. Save and restart the service.






                share|improve this answer
























                  up vote
                  1
                  down vote













                  Edit the init script and add -q -l /var/log/snort to snort. Save and restart the service.






                  share|improve this answer






















                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    Edit the init script and add -q -l /var/log/snort to snort. Save and restart the service.






                    share|improve this answer












                    Edit the init script and add -q -l /var/log/snort to snort. Save and restart the service.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jun 20 '14 at 15:22









                    schaiba

                    5,38312028




                    5,38312028






















                        up vote
                        0
                        down vote













                        You should modify the /etc/sysconfig/snort file as options will be read from there. LOGDIR (-l) is set to /var/log/snort by default.






                        share|improve this answer
























                          up vote
                          0
                          down vote













                          You should modify the /etc/sysconfig/snort file as options will be read from there. LOGDIR (-l) is set to /var/log/snort by default.






                          share|improve this answer






















                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            You should modify the /etc/sysconfig/snort file as options will be read from there. LOGDIR (-l) is set to /var/log/snort by default.






                            share|improve this answer












                            You should modify the /etc/sysconfig/snort file as options will be read from there. LOGDIR (-l) is set to /var/log/snort by default.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Sep 30 '16 at 13:38









                            thisismydesign

                            1011




                            1011




















                                up vote
                                0
                                down vote













                                According to Snort Manual v2.9.11 written under The Snort Project



                                To read packets & record them to disc, we need to specify a logging directory that If not specified, by default It is created with name log in current directory. If log directory is not configured in snort, It exits with an error message.



                                So, you need to specify the logging directory in the init script while starting the snort itself by typing in :



                                ./snort -q -dev -l /path/to/log/file


                                Now save the script and restart the service.



                                Also, consider giving your time to this Script by markus1982. It would be really helpful.






                                share|improve this answer
























                                  up vote
                                  0
                                  down vote













                                  According to Snort Manual v2.9.11 written under The Snort Project



                                  To read packets & record them to disc, we need to specify a logging directory that If not specified, by default It is created with name log in current directory. If log directory is not configured in snort, It exits with an error message.



                                  So, you need to specify the logging directory in the init script while starting the snort itself by typing in :



                                  ./snort -q -dev -l /path/to/log/file


                                  Now save the script and restart the service.



                                  Also, consider giving your time to this Script by markus1982. It would be really helpful.






                                  share|improve this answer






















                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    According to Snort Manual v2.9.11 written under The Snort Project



                                    To read packets & record them to disc, we need to specify a logging directory that If not specified, by default It is created with name log in current directory. If log directory is not configured in snort, It exits with an error message.



                                    So, you need to specify the logging directory in the init script while starting the snort itself by typing in :



                                    ./snort -q -dev -l /path/to/log/file


                                    Now save the script and restart the service.



                                    Also, consider giving your time to this Script by markus1982. It would be really helpful.






                                    share|improve this answer












                                    According to Snort Manual v2.9.11 written under The Snort Project



                                    To read packets & record them to disc, we need to specify a logging directory that If not specified, by default It is created with name log in current directory. If log directory is not configured in snort, It exits with an error message.



                                    So, you need to specify the logging directory in the init script while starting the snort itself by typing in :



                                    ./snort -q -dev -l /path/to/log/file


                                    Now save the script and restart the service.



                                    Also, consider giving your time to this Script by markus1982. It would be really helpful.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Apr 2 at 19:02









                                    C0deDaedalus

                                    450312




                                    450312



























                                         

                                        draft saved


                                        draft discarded















































                                         


                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f138285%2fhow-to-start-the-snort-service-with-logging-enabled%23new-answer', 'question_page');

                                        );

                                        Post as a guest













































































                                        Popular posts from this blog

                                        Peggy Mitchell

                                        Palaiologos

                                        The Forum (Inglewood, California)