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

    Blocked IP reaching server anyway

    Scheduled Pinned Locked Moved Firewalling
    41 Posts 9 Posters 5.3k 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.
    • cdsJerryC
      cdsJerry @johnpoz
      last edited by cdsJerry

      @johnpoz OK, so Badguys 5 has been evaluated 7.461 M times since the reset but there are no current states active. Right? There are no WAN rules above this line that ever allow traffic to pass so I'd look at the Floating rules right? But I don't see a floating rule that would pass to the mail server. (picture above).

      009d8c5a-afb9-4e4b-a672-6ab0540251b2-image.png 0f57db33-94bd-4491-b240-e434cc4285a4-image.png

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

        @cdsjerry yeah your badbuys5 has had lots of evaluations 29MBs worth.. and badbuys 2 has some above, so that would prob preven from the 2nd badguys 2 rule from ever seeing traffic. But that badbuys not seeing any evaluations on it..

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

        cdsJerryC 1 Reply Last reply Reply Quote 0
        • cdsJerryC
          cdsJerry @johnpoz
          last edited by

          @johnpoz But the IP that's reaching the firewall is in Badguys5, which IS getting evaluations... but is still passing traffic. I'm confused as to why it would pass traffic that's a block.

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

            @cdsjerry it wouldn't unless it doesn't match, or there was a state. or some other rule allowed it..

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

            cdsJerryC 1 Reply Last reply Reply Quote 0
            • cdsJerryC
              cdsJerry @johnpoz
              last edited by

              @johnpoz The IP is a match. I reset the states so they'd be cleared. There are no pass rules above it, and don't see any floating rule pass. Is there some way to tell why its passing? The log doesn't seem to be any help.

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

                @cdsjerry you could log all allow rules to see what is allowing it in..

                You could also use pftop from cmd line on pfsense to see age of the state..

                Maybe the state didn't get cleared when you tried to clear it, are you saying you actually rebooted pfsense?

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

                cdsJerryC 1 Reply Last reply Reply Quote 0
                • cdsJerryC
                  cdsJerry @johnpoz
                  last edited by

                  @johnpoz No I didn't reboot pfSense. I went to Diagnostics / States / Reset States and checked the box to reset the firewall state table and then the reset button.

                  I haven't seen either of the two IPs that were attacking me for a while now. Maybe it's working or maybe they've just gone away for a while. Over they past few weeks they'll hit me with repeated attempts and then go away for a bit then come back again. Sometimes it's hours. Sometimes it's days. USUALLY when I enter their IP into the Badguys list they aren't able to get through starting right away. That's why these two caught my attention when they were still getting in.

                  Of course the mail server blocks them after a bit but they can sure slow things down with all their attempts.

                  DerelictD 1 Reply Last reply Reply Quote 0
                  • DerelictD
                    Derelict LAYER 8 Netgate @cdsJerry
                    last edited by

                    @cdsjerry Are you positive the IP address in question is actually in the Badguys5 alias? See Diagnostics > Tables and check the actual contents table/alias in question.

                    You can also do this in Diagnostics > Command prompt:

                    pfctl -vvss | grep -A3 inter.esting.ip.address

                    That will show you any matching states along with the firewall rule that passed the traffic when the state was created.

                    You can then pfctl -vvsr | grep -A3 '^@RULENUMBER' to identify the rule.

                    Chattanooga, Tennessee, USA
                    A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                    DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                    Do Not Chat For Help! NO_WAN_EGRESS(TM)

                    cdsJerryC 1 Reply Last reply Reply Quote 1
                    • cdsJerryC
                      cdsJerry @Derelict
                      last edited by

                      @derelict I'm sure that both examples I've been watching are in Badguys5. I've checked a dozen times or more just to make sure I didn't fat-finger it. I even copied / pasted it directly from the server log a couple of times. That's one thing I am sure of.

                      Our office is closed for the weekend (love / hate holidays). I'll try the commands when I get back but of course I'll need to wait until I also catch them hitting the server close enough to still be in the logs / states.

                      I know the mail server is blocking them so they aren't actually doing any harm other than slowing down the server or else I'd be in the office after-hours trying to solve this.

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

                        @cdsjerry said in Blocked IP reaching server anyway:

                        both examples I've been watching are in Badguys5

                        but you want to make sure its actually loaded in the table.. This is what he was mentioning. Just looking the alias doesn't mean its actually loaded in the table.

                        Under diagnostics - look under tables and make sure its loaded there and correct.

                        example of one of my aliases

                        example.jpg

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

                        1 Reply Last reply Reply Quote 0
                        • B
                          biggsy
                          last edited by biggsy

                          @cdsJerry

                          How come your Badguys5 (and Badguys2) rules are only blocking IPv4 TCP traffic, not all IPv4 like the others?

                          Yeah, SMTPD should only be listening on TCP 25 but . . .

                          P.S. Is that an IPSwitch/Progress IMail Server?

                          cdsJerryC 1 Reply Last reply Reply Quote 0
                          • E
                            Euman
                            last edited by

                            I have a Netgate 6100 (v22.05 stable) I had a similar issue. I found that copying a firewall rule and adding different address's or ports was not actually creating a new rule. :) When I discovered this, I manually entered the new rules across the board and fixed the problem. Could be related from what I've read, shrugs.

                            DerelictD E 2 Replies Last reply Reply Quote 1
                            • DerelictD
                              Derelict LAYER 8 Netgate @Euman
                              last edited by

                              @euman Yes, it does.

                              Chattanooga, Tennessee, USA
                              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                              Do Not Chat For Help! NO_WAN_EGRESS(TM)

                              1 Reply Last reply Reply Quote 0
                              • E
                                Euman @Euman
                                last edited by

                                @Derelict I'm sorry to inform you that the firewall did NOT properly manage the creation of a new rule and Tracking ID via a copy of similar rule. What 'was' strange is that this only affected my LAN-2 rules.. I digress, you know better. however, we all are aware there are no bugs in NG software.. smirks, I'd love to spin up the development version but my appliance coughed and said no thanks.

                                back to lying now, hagd

                                DerelictD 1 Reply Last reply Reply Quote 0
                                • DerelictD
                                  Derelict LAYER 8 Netgate @Euman
                                  last edited by

                                  @euman There is a known (fixed) issue regarding copying multiple rules all getting the same rule ID but they still function.

                                  https://redmine.pfsense.org/issues/13507

                                  Chattanooga, Tennessee, USA
                                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                  1 Reply Last reply Reply Quote 0
                                  • cdsJerryC
                                    cdsJerry @biggsy
                                    last edited by

                                    @biggsy Good catch on the TCP only traffic. I've fixed that so it's now blocking all traffic instead.

                                    Yes, I am running IPSwitch/ Progress IMail server. Any hints or tricks about that? I'm REALLY hoping someone buys that product line. It's a great mail server. Progress is making a mistake by saying they're going to EOL it.

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