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

    SSH Login Attempts

    Scheduled Pinned Locked Moved General pfSense Questions
    20 Posts 3 Posters 3.4k 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.
    • ahking19A
      ahking19
      last edited by

      I don't currently have an active WAN firewall rule to allow inbound port 22.

      I did have a rule that was port forwarding 22 to an SFTP server but that rule is disabled, although it exists. Haven't used the SFTP server in 10-12 months so I could delete the rule.

      -Andrew

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

        post up your wan rules.. NO turning on enable ssh does not auto create wan rule to allow traffic.

        Do you have any floating rules?

        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

        ahking19A 1 Reply Last reply Reply Quote 0
        • NogBadTheBadN
          NogBadTheBad
          last edited by

          I used this on my Pi running FreeBSD if ever you need to block SSH brute force attacks:-

          https://www.cyberciti.biz/faq/freebsd-openbsd-pf-stop-ftp-bruteforce-attacks/

          Andy

          1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

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

            pfsense has built in lockout of failed attempts

            https://www.netgate.com/docs/pfsense/firewall/sshlockout.html

            Sure there is a way to adjust the number of fails - but I do not think its in the gui anywhere.

            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 2
            • ahking19A
              ahking19 @johnpoz
              last edited by

              @johnpoz Here are the rules
              0_1533234265878_Screen Shot 2018-08-02 at 11.19.04 AM.png

              NogBadTheBadN 1 Reply Last reply Reply Quote 0
              • NogBadTheBadN
                NogBadTheBad @ahking19
                last edited by

                @ahking19

                How about the floating rules ?

                Andy

                1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

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

                  Dude your rule right there on top allows ANY Ip in that pfb_europe_v4 to anything... Why in the world would you have such a rule???

                  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

                  NogBadTheBadN 1 Reply Last reply Reply Quote 0
                  • ahking19A
                    ahking19 @NogBadTheBad
                    last edited by

                    @nogbadthebad

                    No floating rules

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

                      That first rule allows access to anything.. Coming from anything in that alias.. So no shit getting brute force on ssh, and your gui to as well.

                      Why do you think you need such a rule?

                      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

                      ahking19A 1 Reply Last reply Reply Quote 0
                      • NogBadTheBadN
                        NogBadTheBad @johnpoz
                        last edited by

                        @johnpoz said in SSH Login Attempts:

                        Dude your rule right there on top allows ANY Ip in that pfb_europe_v4 to anything... Why in the world would you have such a rule???

                        What John said, if you look in the firewall logs, you'll see it as its logging it.

                        Andy

                        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

                        1 Reply Last reply Reply Quote 0
                        • ahking19A
                          ahking19 @johnpoz
                          last edited by

                          @johnpoz

                          Damn, was temp rule for team working in France. Updated rule to only allow OpenVPN.0_1533234938408_Screen Shot 2018-08-02 at 11.33.16 AM.png

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

                            That rule is pointless since you have a rule just below it that allows vpn any source. Unless you just want to log those from that alias?

                            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
                            • ahking19A
                              ahking19
                              last edited by

                              There is a block rule in between if NOT North America.

                              NogBadTheBadN 1 Reply Last reply Reply Quote 0
                              • NogBadTheBadN
                                NogBadTheBad @ahking19
                                last edited by

                                @ahking19 said in SSH Login Attempts:

                                North America.

                                Wouldn't it be better to change the block rule in between if NOT North America to a pass North America, then the rule beneath block any OpenVPN and log?

                                Andy

                                1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

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

                                  True.. on the ! NA rule.

                                  But you could for sure write those rules a bit more clear.. But without knowing EXACTLY what your wanting to do its just guessing, etc.

                                  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
                                  • ahking19A
                                    ahking19 @NogBadTheBad
                                    last edited by

                                    @nogbadthebad

                                    That would be fine for OpenVPN. But also don't need HTTP & HTTPS sites available outside North America. Not sure how/if I can combine pfBlocker rule with NAT rule. if that makes sense...

                                    -Andrew

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

                                      Sure you can if you just use its aliases - they can be used anywhere you want.. Rule, Nat, etc.

                                      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
                                      • ahking19A
                                        ahking19
                                        last edited by

                                        Thanks. I'll take a look at using the pfBlocker aliases.

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