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

    What is the biggest attack in GBPS you stopped

    Scheduled Pinned Locked Moved General pfSense Questions
    737 Posts 33 Posters 600.5k 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.
    • S
      Supermule Banned
      last edited by

      Youre welcome mate :)

      1 Reply Last reply Reply Quote 0
      • T
        tim.mcmanus
        last edited by

        RRD graphs use a process called php-fpm.  You'll see it in top.

        Also, when you run top, use the following arguments:  top -HSP

        It'll look like the attachment, which gives you some good resolution into what's running on the system.

        ![Screen Shot 2015-06-01 at 10.49.39 PM.png](/public/imported_attachments/1/Screen Shot 2015-06-01 at 10.49.39 PM.png)
        ![Screen Shot 2015-06-01 at 10.49.39 PM.png_thumb](/public/imported_attachments/1/Screen Shot 2015-06-01 at 10.49.39 PM.png_thumb)

        1 Reply Last reply Reply Quote 0
        • S
          Supermule Banned
          last edited by

          How do you get a list that long Tim??

          Mine has maybe 10 processes listed on the page

          I am beginning to see this in top

          0 root     -92    0     0K   176K CPU4    4   1:17  98.97% kernel{em0 taskq}
          
          
          1 Reply Last reply Reply Quote 0
          • F
            firewalluser
            last edited by

            It looks like the same output seen in the Diagnostics: System Activity webpage and on mine even throughout the ddos I had no more than 20 processes running unlike your screen shot which has a few more running.

            I wonder if I load up my fw with more services to increase the processes running might increase the system exhaustion.

            I'm still undecided whether this is an SMP issue or an exhaustion of some system resources, the reason I say the latter is I'm reminded of MS Small Business Server which I'd maintained since 2000, as windows has grown so has the hw requirements to the point in 2008R2 and later you needed MS SQL server running on its own box as the software components have grown in size and functionality. My favourite was SBS2003 as I had those running better than MS could, ie they could stay up for months if it wasnt the need to reboot after some sort of windows update that needed a reboot. I did have to reset the odd counter but they ran sweet, however when underload you could get those machines to bog down eventually grinding to a halt and thus a reboot, so I wonder if something similar is happening.

            I'm gonna try and find something other than syslog to report back the state of the machine, perhaps security onion which I need to check out still, but I'm keen to find something that can control parts of the fw depending on some situations occurring, ie if I get a ddos, I can resave the WAN interface and get assigned a new ip address as one measure I'd like to implement. I could knock something up but its also a case of getting the data out of pfsense over and above syslog data that would make it even more useful.

            Still lots to learn.

            Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

            Asch Conformity, mainly the blind leading the blind.

            1 Reply Last reply Reply Quote 0
            • T
              tim.mcmanus
              last edited by

              I can ssh into the box from another source, and I have a 27" screen, so that gives me better screen output on the CLI.

              1 Reply Last reply Reply Quote 0
              • S
                Supermule Banned
                last edited by

                Didnt think of that. :D

                ![top -HSP.PNG](/public/imported_attachments/1/top -HSP.PNG)
                ![top -HSP.PNG_thumb](/public/imported_attachments/1/top -HSP.PNG_thumb)

                1 Reply Last reply Reply Quote 0
                • F
                  firewalluser
                  last edited by

                  Whilst I remember the crash reports.

                  Crash report begins.  Anonymous machine information:

                  amd64
                  10.1-RELEASE-p9
                  FreeBSD 10.1-RELEASE-p9 #0 57b23e7(releng/10.1)-dirty: Mon Apr 13 20:30:25 CDT 2015    root@pfs22-amd64-builder:/usr/obj.amd64/usr/pfSensesrc/src/sys/pfSense_SMP.10

                  Crash report details:

                  PHP Errors:
                  [02-Jun-2015 12:13:04 Europe/London] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 265551872 bytes) in /usr/local/www/diag_packet_capture.php on line 456

                  Filename: /var/crash/minfree
                  2048

                  and

                  Crash report begins.  Anonymous machine information:

                  amd64
                  10.1-RELEASE-p9
                  FreeBSD 10.1-RELEASE-p9 #0 57b23e7(releng/10.1)-dirty: Mon Apr 13 20:30:25 CDT 2015    root@pfs22-amd64-builder:/usr/obj.amd64/usr/pfSensesrc/src/sys/pfSense_SMP.10

                  Crash report details:

                  PHP Errors:
                  [02-Jun-2015 17:32:09 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 265551872 bytes) in /usr/local/www/diag_packet_capture.php on line 456

                  Looks like pfsense doesnt like packet capturing a ddos  ;D, havent checked the line out yet but I couldnt find anything in /var/crash/, although having the packet capture shut down nicely would be ideal.

                  It might be useful if the crash reports werent deleted after a reboot and I dont know if this got sent through to ESF or not and only one file mentioned in the first report, no additional file in the 2nd crash report.

                  I also dont think the Wired & Buf MB's increases were anything to do with the packet capture as it looks the packet cpature crashed well before the end of the test.

                  Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

                  Asch Conformity, mainly the blind leading the blind.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Supermule Banned
                    last edited by

                    After fiddling with some settings under system ->tunables i got it to distribute the load better so to speak.

                    No 100% cpu core and then it works fine.

                    ![top -HSP_1.PNG](/public/imported_attachments/1/top -HSP_1.PNG)
                    ![top -HSP_1.PNG_thumb](/public/imported_attachments/1/top -HSP_1.PNG_thumb)

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

                      @firewalluser:

                      I'm gonna try and find something other than syslog to report back the state of the machine, perhaps security onion which I need to check out still, but I'm keen to find something that can control parts of the fw depending on some situations occurring, ie if I get a ddos, I can resave the WAN interface and get assigned a new ip address as one measure I'd like to implement. I could knock something up but its also a case of getting the data out of pfsense over and above syslog data that would make it even more useful.

                      Still lots to learn.

                      For quick simple stats, man vmstat  man procstat

                      1 Reply Last reply Reply Quote 0
                      • T
                        tim.mcmanus
                        last edited by

                        @firewalluser:

                        PHP Errors:
                        [02-Jun-2015 12:13:04 Europe/London] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 265551872 bytes) in /usr/local/www/diag_packet_capture.php on line 456

                        PHP Errors:
                        [02-Jun-2015 17:32:09 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 265551872 bytes) in /usr/local/www/diag_packet_capture.php on line 456

                        Those are php crashes.  Don't run the webUI and see if it works.  Odd that ph would crash the machine.  I would have expected it to die as a process and then respawn.

                        1 Reply Last reply Reply Quote 0
                        • T
                          tim.mcmanus
                          last edited by

                          @Supermule:

                          After fiddling with some settings under system ->tunables i got it to distribute the load better so to speak.

                          No 100% cpu core and then it works fine.

                          snort and the two kernel processes {em0, task}, {em1, task} are still nearly the same between the two screen shots.  Interesting that one of those kernel processes isn't sitting on a CPU in the second screen shot.

                          1 Reply Last reply Reply Quote 0
                          • F
                            firewalluser
                            last edited by

                            @tim.mcmanus:

                            @firewalluser:

                            PHP Errors:
                            [02-Jun-2015 12:13:04 Europe/London] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 265551872 bytes) in /usr/local/www/diag_packet_capture.php on line 456

                            PHP Errors:
                            [02-Jun-2015 17:32:09 UTC] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 265551872 bytes) in /usr/local/www/diag_packet_capture.php on line 456

                            Those are php crashes.  Don't run the webUI and see if it works.  Odd that ph would crash the machine.  I would have expected it to die as a process and then respawn.

                            I've got a permanent packet capture going in so I have records for posterity as the police wont do anything in some circumstances if you get hacked over here, so the more data the better as it will be possible to track down those behind hack attempts with more data, whilst also making it easier to incriminate myself as well I'm sure.

                            Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

                            Asch Conformity, mainly the blind leading the blind.

                            1 Reply Last reply Reply Quote 0
                            • F
                              firewalluser
                              last edited by

                              @Supermule:

                              After fiddling with some settings under system ->tunables i got it to distribute the load better so to speak.

                              No 100% cpu core and then it works fine.

                              So what settings did you add or change?

                              @mer:

                              @firewalluser:

                              I'm gonna try and find something other than syslog to report back the state of the machine, perhaps security onion which I need to check out still, but I'm keen to find something that can control parts of the fw depending on some situations occurring, ie if I get a ddos, I can resave the WAN interface and get assigned a new ip address as one measure I'd like to implement. I could knock something up but its also a case of getting the data out of pfsense over and above syslog data that would make it even more useful.

                              Still lots to learn.

                              For quick simple stats, man vmstat  man procstat

                              Thanks, however whats the best way to get all/as much data as possible including rule matches out of pfsense, I've got to check out security onion but if there are other ways I'm all ears. I saw nagios earlier which might be interesting to see what and how it gets data out of pfsense and other platforms, but theres things it doesnt do which I'd like.

                              Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

                              Asch Conformity, mainly the blind leading the blind.

                              1 Reply Last reply Reply Quote 0
                              • T
                                tim.mcmanus
                                last edited by

                                @firewalluser:

                                @Supermule:

                                After fiddling with some settings under system ->tunables i got it to distribute the load better so to speak.

                                No 100% cpu core and then it works fine.

                                So what settings did you add or change?

                                @mer:

                                @firewalluser:

                                I'm gonna try and find something other than syslog to report back the state of the machine, perhaps security onion which I need to check out still, but I'm keen to find something that can control parts of the fw depending on some situations occurring, ie if I get a ddos, I can resave the WAN interface and get assigned a new ip address as one measure I'd like to implement. I could knock something up but its also a case of getting the data out of pfsense over and above syslog data that would make it even more useful.

                                Still lots to learn.

                                For quick simple stats, man vmstat  man procstat

                                Thanks, however whats the best way to get all/as much data as possible including rule matches out of pfsense, I've got to check out security onion but if there are other ways I'm all ears. I saw nagios earlier which might be interesting to see what and how it gets data out of pfsense and other platforms, but theres things it doesnt do which I'd like.

                                I have Security Onion set it, and for these attacks, the best IMHO is Wireshark.  It'll do more for you in the near term.  SO is a good suite of tools, but it's not for the faint of heart.  It requires work to set it up properly and to ensure rules are updated.  Also, you'll need a decent sized hard drive because it captures and logs every packet.  The more storage, the more historical.  So also won't get anything out of pfSense, in fact it won't talk to it unless you integrate snort and barnyard from one box to the other.

                                nagios is also not for the faint of heart.  I went with OpenNMS because it's easy to set up, and I already know SNMP.  If you want any more granularity into the box, you'll have to go with an agent-based monitoring tool or something like vRealize Hyperic for your VMs, and that ain't cheap.

                                dtrace is the best place to start if you want to get granular information out of pfSense.  It's a FreeBSD debugging tool, and that's exactly what needs to be done to determine the root cause.  And there is a somewhat steep learning curve there if you've never written or debugged your own complied code.  Not impossible, but it will take time.

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Supermule Banned
                                  last edited by

                                  This is what I have added so far. Its not perfect but way better than out of the box.

                                  Changing the maxlen queue did good in regards to distributing load, but it seems it doesnt survive a reboot.

                                  system_tunables.PNG
                                  system_tunables.PNG_thumb

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

                                    Those are most likely sysctls, worst case is you can put them in /etc/sysctl.conf to survive a reboot.

                                    1 Reply Last reply Reply Quote 0
                                    • F
                                      firewalluser
                                      last edited by

                                      @mer:

                                      Those are most likely sysctls, worst case is you can put them in /etc/sysctl.conf to survive a reboot.

                                      Which if sysctl.conf does need to be edited, then this thread https://forum.pfsense.org/index.php?topic=81174.0 or this thread https://forum.pfsense.org/index.php?topic=94511.0 can help those changes survive the reboot because even though the threads discuss syslog.conf and system.inc files, the principle will be the same, ie the filename is not so important but the methods to keep the changes is.

                                      Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

                                      Asch Conformity, mainly the blind leading the blind.

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        Supermule Banned
                                        last edited by

                                        For you to enjoy

                                        top -HSP

                                        Youtube Video

                                        top -asSHz1

                                        Youtube Video

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          tim.mcmanus
                                          last edited by

                                          @Supermule:

                                          For you to enjoy

                                          top -HSP

                                          Youtube Video

                                          top -asSHz1

                                          Youtube Video

                                          Are you running pfSense in a hypervisor?  If so, you're dealing with an additional abstraction layer.  What does the hypervisor kernel look like?  You should, I think, be able to run top by sshing into ESXi.  However, the point is that running it on a hypervisor may mask r present issues differently than running on bare metal.

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            Supermule Banned
                                            last edited by

                                            With esxtop running

                                            http://youtu.be/_dimZ1_DO_o

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