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

    pfsense 2.6.0 sshguard @ web gui bug/crash

    Scheduled Pinned Locked Moved General pfSense Questions
    108 Posts 4 Posters 24.1k 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.
    • GertjanG
      Gertjan @VioletDragon
      last edited by

      Probably not related, but :
      @violetdragon said in pfsense 2.6.0 sshguard @ web gui bug/crash:

      2020/09/08 04:19:59 [error] 4127#100429: *20842 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 192.168.1.9, server: , request: "POST /acme/acme_certificates.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm.socket", host: "violetdragon.ddns.net:10443", referrer: "https://violetdragon.ddns.net:10443/acme/acme_certificates.php"

      Who is accessing what from where ?
      Why is a LAN based client using "violetdragon.ddns.net" (the WAN IP ?? )- why not using the LAN IP of pfSense host name, which is 192.168.1.1 ?
      Or is your pfsense really called "violetdragon" and your domain set to "ddns.net" ? So "violetdragon.ddns.net" is 192.168.1.1 (looks very wrong to me).

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      VioletDragonV 1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        It's unusual but it should work fine that way. The disks widget shouldn't care.

        GertjanG 1 Reply Last reply Reply Quote 0
        • GertjanG
          Gertjan @stephenw10
          last edited by

          @stephenw10

          Sure thing.
          It looked to me as if the request came from the 'outside' which means he opened up the GUI to the outside world. And that opens up a can of worms.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • VioletDragonV
            VioletDragon @Gertjan
            last edited by

            @gertjan If you look at the logs carefully, you will see that the 1.9 IP is my workstation, violetdragon.ddns.net was the DDNS Hostname of the firewall and I was internally wrapping it inside meaning, I was using the DDNS Hostname with DNS Resolver it is not unusual to do, I moved to two Static IPs for Ha on my WAN so now i am using a proper FQDN with DNS Resolver & Haproxy with SSL Offloading for Lets Encrypts for both Internal Services and External Services, I guess your not familiar with this kind of setup, and yes I have moved the IP of the Firewall from 1.1 this is what you do in the CCNA world. Web Gui is not publicly exposed I am not that dumb to publicly expose the Web Gui same with SSH on everything, for External use I use my FQDN and OpenVPN/IPsec for offsite Servers.

            1 Reply Last reply Reply Quote 0
            • VioletDragonV
              VioletDragon @jimp
              last edited by

              @jimp Hi, it is a ZFS Mirror.

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Mmm, not seeing any issues on systems with ZFS mirrors here.
                Hopefully the video should clarify things.

                Steve

                VioletDragonV 1 Reply Last reply Reply Quote 0
                • VioletDragonV
                  VioletDragon @stephenw10
                  last edited by

                  @stephenw10 I will get the video to you in a few hours, I have had a busy weekend with it being bank holiday. Sorry for the delays.

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    No worries, I'm glad you were able to narrow down the cause this far already.

                    VioletDragonV 2 Replies Last reply Reply Quote 0
                    • VioletDragonV
                      VioletDragon @stephenw10
                      last edited by

                      @stephenw10 Hi, Just to report back. Even after removing the Disk Widget the problem is still there cannot access the web gui at all then it starts working but can access different tabs. This is weird.

                      1 Reply Last reply Reply Quote 0
                      • VioletDragonV
                        VioletDragon @stephenw10
                        last edited by VioletDragon

                        @stephenw10 Hi, Here is the Video, I had to put it on one of my Servers, Hopefully you will be able to play it. This is from one of my Firewalls in a different location, I have another with the same issue as well. (https://cloud.violetdragonscloudnetwork.co.uk/s/iCKFFgmqQ8jLQ5a)

                        GertjanG 1 Reply Last reply Reply Quote 0
                        • GertjanG
                          Gertjan @VioletDragon
                          last edited by

                          @violetdragon

                          What happens when you use the 'admin' user ?
                          Jack is fine, but that's probably not an 'admin'.
                          Dome info collected by the dashboard GUI page need 'admin' rights.

                          Why creating a user like Jack ? pfSense is a router firewall, not some file server.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          VioletDragonV 1 Reply Last reply Reply Quote 0
                          • VioletDragonV
                            VioletDragon @Gertjan
                            last edited by

                            @gertjan Security, admin is a easy username to guess. Admin user does the exact same. But I have a ton of PHP-FPM processes when this happens. I've also triggered the problem by attempting brute-forces via SSH. I have va feeling that maybe something is going on.

                            GertjanG 1 Reply Last reply Reply Quote 0
                            • GertjanG
                              Gertjan @VioletDragon
                              last edited by

                              @violetdragon said in pfsense 2.6.0 sshguard @ web gui bug/crash:

                              Security, admin is a easy username to guess.

                              Yeah, but who cares ?
                              Normally, the GUI should only be accessible from the LAN interface.
                              The other LAN ( OPT1 OPT2 OPT3 ) interfaces are meant to be used for you local network.
                              This allows you to even completely disconnect the LAN interface when you don't need the GUI access. That what security is.

                              Easy user names and passwords are a thing on a public network.
                              Your LAN is not a public network.

                              I've changed a user called '001' so it has admin privilges, like this :

                              686afb44-ef2e-4d5f-8320-d4a8fa64d249-image.png

                              Now I can login with '001' and the dashboard shows up in half a second.

                              What happens when you remove all or most of the the widgets ?
                              Login again to try again.

                              No "help me" PM's please. Use the forum, the community will thank you.
                              Edit : and where are the logs ??

                              1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by

                                Ah, OK so something you have on your dashboard is taking an age to timeout before even rendering.
                                We can't see what widgets you have showing there but can I assume it's the disks widget causing it? If you remove it then the dash displays in the expected time?
                                And does that only happen with user 'Jack'? If you login as admin do you still see the delay?

                                Steve

                                VioletDragonV 1 Reply Last reply Reply Quote 0
                                • VioletDragonV
                                  VioletDragon @stephenw10
                                  last edited by VioletDragon

                                  @stephenw10 Hi, it happens on both users, admin and jack, Widgets i have on the home page I have also removed them then tested again but issue is still there, disabling ssh does not fix the problem, but there is loads of php-fpm in the logs.

                                  Picture,
                                  System Information,
                                  Interfaces,
                                  Services Status,
                                  Installed Packages,
                                  NTP Status,
                                  pfBlockerNG,
                                  Gateways,
                                  UPS Status,
                                  Firewall Logs,
                                  Interface Statistics,
                                  Thermal Sensors,
                                  SMART Status,
                                  Haproxy,
                                  Snort Alerts,
                                  Traffic Graphs.

                                  I have notice a something though, when this happens it's always from 12am to 5:30am when this happens. But i can trigger it though, false logins via SSH. But there's nothing in the logs about Brute Force attacks but there is something triggering it though because sshguard is being triggered and logs are full of sshguard every few minutes, disabling ssh in general does not fix the problem neither so it is either maybe a bug? or maybe someones inside the network.

                                  Saying the time when this happens, I have noticed it's being triggered again but the Web Gui is still working, the logs are full of,

                                  Apr 20 15:59:00	sshguard	84660	Now monitoring attacks.
                                  Apr 20 15:59:00	sshguard	11578	Exiting on signal.
                                  Apr 20 16:33:00	sshguard	85149	Now monitoring attacks.
                                  Apr 20 16:33:00	sshguard	84660	Exiting on signal.
                                  Apr 20 17:12:00	sshguard	57530	Now monitoring attacks.
                                  Apr 20 17:12:00	sshguard	85149	Exiting on signal.
                                  Apr 20 17:51:00	sshguard	26088	Now monitoring attacks.
                                  Apr 20 17:51:00	sshguard	57530	Exiting on signal.
                                  Apr 20 17:54:00	sshguard	34895	Now monitoring attacks.
                                  Apr 20 17:54:00	sshguard	26088	Exiting on signal.
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    When you see this happen though the symptoms are that the dashboard takes a very long time to load but does eventually load. Other pages in the webgui load as expected?

                                    Hitting the system with bad logins triggers sshguard but that prevents you accessing the firewall entirely for length of the block.

                                    The sshguard entries you see in in the system log are the service restarting because your logs are rotating. Nothing is being blocked there.

                                    This is unrelated to sshguard as far as I can see. It just produces similar symptoms.

                                    Did you see which log is rotating at 3min intervals? What's in it?

                                    Something is causing both a lot of logging and one of the dashboard widgets to load very slowly.
                                    Some of those widgets include logs so that could be related. Or they could both be symptoms of something else.

                                    What made you think this was the disks widget at one time?

                                    Steve

                                    VioletDragonV 1 Reply Last reply Reply Quote 0
                                    • VioletDragonV
                                      VioletDragon @stephenw10
                                      last edited by

                                      @stephenw10 Other tabs work except for the home page even removing the widget don't fix it, reason why i though it could of been the disk widget is that's when it stopped acting up when i removed it from the homepage,

                                      I just find it weird how it happens only in the early hours of the night i noticed it because that's when i do my maintenance, upgrades etc on a weekend as it's not just me that uses the network.

                                      I did some packet tracing not long ago but have not found anything unusual on the Network but i will run another tonight early hours of the morning and keep it running too see if i find anything obscure happening.

                                      As for the logs rotating I just find it strange all the years I have been running pfSense I have not seen this activity until now which is why I think that there could be someone lurking in the network I might just be paranoid but it's always good to know what is going on with a network that is publicly exposed. As for the logs I have not checked which would you recommend to go with?

                                      Not mentioned this but the zpool was not updated so i did that last night so ZFS is now running the latest update but I have noticed a ton of ZFS Write Errors in the System log but zpool status does not show any problems.

                                      Thanks.

                                      Jack.

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        You only see those sshguard logs since 2.6 because the logging was changed from circular logs to the standard FreeBSD logs. In previous versions the syslog service never restarted so sshguard did not.

                                        VioletDragonV 1 Reply Last reply Reply Quote 0
                                        • VioletDragonV
                                          VioletDragon @stephenw10
                                          last edited by

                                          @stephenw10 I see, could the Gui be kinda broken after upgrades ? Because this is a old install from 2.4 maybe that could be causing the problem ? It is strange though right?

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            I can't imagine anything that would have come over from the old config that would cause this.

                                            The fact it only happens some of the time implies something external that's changing. It's going to be something that's trying to parse some huge file for some reason. Probably some log file given the sshguard logs.
                                            I think you checked the Monitoring graphs for the incoming blocked traffic? That's what I expect to be the most likely cause.

                                            Steve

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