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

    SSH "attacks"

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 5 Posters 264 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.
    • A
      ahole4sure @elvisimprsntr
      last edited by

      @elvisimprsntr

      Thanks I do not

      I only have my Wireguard ports open

      Is there anyway the attack is coming via WG or Tailscale?

      Image 7-25-25 at 10.18โ€ฏAM.jpeg

      S johnpozJ 2 Replies Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @ahole4sure
        last edited by

        @ahole4sure FWIW the rule for port 587 won't trigger there because a packet from LAN doesn't arrive on WAN.

        Do you have any NAT rules defined?

        FWIW the "exiting"/"now monitoring attacks" messages are logged when sshguard restarts due to a log file rollover so ignore those.

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote ๐Ÿ‘ helpful posts!

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator @ahole4sure
          last edited by

          @ahole4sure do you have any floating rules? Is ssh running on standard port 22?

          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.8, 24.11

          A 1 Reply Last reply Reply Quote 0
          • A
            ahole4sure @johnpoz
            last edited by

            @johnpoz

            No floating rules and ssh on 22

            S 1 Reply Last reply Reply Quote 0
            • S
              SteveITS Galactic Empire @ahole4sure
              last edited by

              @ahole4sure Watch for open states for 22.

              if you Status > Filter Reload do the rules load successfully?

              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
              Upvote ๐Ÿ‘ helpful posts!

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

                It could be over a VPN if the other side of that is forwarding connections to you.

                But, yes, I would check the states and see which interface has port 22 states on it.

                A 1 Reply Last reply Reply Quote 0
                • A
                  ahole4sure @stephenw10
                  last edited by

                  @stephenw10

                  Thanks
                  Not sure if I did correctly or not but I went to
                  Diagnostics > States
                  And filter expression - โ€œ:22โ€

                  I got no states actually for :22
                  There were several results but they were like this as an example. But not really port 22
                  108.146.69.37:22582 -> 8.8.8.8:53

                  johnpozJ 1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator @ahole4sure
                    last edited by

                    @ahole4sure said in SSH "attacks":

                    And filter expression - โ€œ:22โ€

                    that wouldn't be right - in the states just use 22

                    states.jpg

                    if you to see something there needs to be an active state.. So if someone tried to hit your ssh like 20 minutes ago, that state would be gone.. If you are hits often enough just keep checking.

                    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.8, 24.11

                    johnpozJ 1 Reply Last reply Reply Quote 1
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @johnpoz
                      last edited by johnpoz

                      If you believe its coming in on your vpn - turn off your vpn for a bit.. Do you continue to see hits? Or start a packet capture on your vpn interface for dest port 22 to your wan IP - let it run until you see another entry in your log.. was anything captured?

                      If you want to validate that your not letting it in via just public IP on your wan - you could go to say can you see me . org and send some traffic to 22.. what does it say - if it gets a SA back then it would be open.. If it times out then its not.

                      If it is coming in via vpn interface - you could create a rule to block such traffic. That is if there is an actual interface with wireguard - I don't run that..

                      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.8, 24.11

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

                        Yup you would only see states while they're still active. So if you are not seeing attacks that often you'd have to get lucky to catch it.

                        But you should see those by filtering for: 22

                        Screenshot from 2025-07-27 01-11-58.png

                        What rules do you have on the VPN interface(s)? It would be unusual to see connections being forwarded to you there though.

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