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

    IP blocked in Rules but still accessing FTP

    Scheduled Pinned Locked Moved Firewalling
    87 Posts 9 Posters 11.7k 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.
    • KOMK
      KOM
      last edited by

      He can't if your rules are correct.  Post a screencap of your WAN rules.

      1 Reply Last reply Reply Quote 0
      • A
        almabes
        last edited by

        The only thing I can think of would be to check and make sure you don't have any floating rules that allow traffic.

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

          Without your rules there is no way for us to help you - clearly your doing it wrong or it would be blocked is the simple answer.

          Please post your floating tab if anything is in there and you wan tab.  And your port forwards would be helpful in seeing how your forwarding ftp into your network in the first place.

          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
          • cdsJerryC
            cdsJerry
            last edited by

            I've attached the two screens requested.

            floating.JPG
            floating.JPG_thumb
            rules.JPG
            rules.JPG_thumb

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

              Well looks like your missing some stuff in your wan..  And what is in remote management and remotemangement ports?

              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
              • cdsJerryC
                cdsJerry
                last edited by

                RemoteManagement is an alias with a couple of fixed IP addresses we use to access pfsense from outside our LAN (setup by pfSense support btw).

                What's missing from the WAN?  pfSense is running in transparent mode (bridge mode?) and not as a router.  That may be why it looks like it's missing some things.

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

                  well for one rule that would even allow ftp?  Looks like that is not the full rule set..  Looks like there more under that from the bottom of that screenshot.

                  And why would you allow to wan net??  Seems odd - shouldn't it be wan address?

                  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
                  • cdsJerryC
                    cdsJerry
                    last edited by

                    Yes there were more rules.  I only copied the rules set down to the level that showed the block for "Badguys". The IP I'm trying to block is listed in that alias so it should stop at that point regardless of the rules below it.  I was just showing that there weren't any rules above it that should have allowed it to pass. Once it hits this block the rest of the rules don't matter.

                    WAN net (set up by pfSense support) allows access to the pfSense settings when in transparent mode.  Should it be an IP? I don't know.  Since pfSense support set it up and they're smarter than I am, I left it the way they had it.

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

                      From my FTP server.  I get hit every few min.


                      (001914)5/7/2015 15:47:34 PM - (not logged in) (71.232.46.105)> 220-Thank you for visiting namehere ftp server.
                      (001914)5/7/2015 15:47:34 PM - (not logged in) (71.232.46.105)> 220 All actions are logged.
                      (001914)5/7/2015 15:47:34 PM - (not logged in) (71.232.46.105)> SSH-2.0-libssh2_1.4.1
                      (001914)5/7/2015 15:47:34 PM - (not logged in) (71.232.46.105)> 500 Syntax error, command unrecognized.
                      (001914)5/7/2015 15:47:37 PM - (not logged in) (71.232.46.105)> disconnected.
                      (001915)5/7/2015 15:54:15 PM - (not logged in) (157.7.237.232)> Connected on port 22, sending welcome message…

                      And from my "badguys" alias as seen on the rules, they're blocked.  So how did they get to the FTP?  They should have been blocked long before they got down to the port settings for the FTP connection.

                      ftpguess.JPG
                      ftpguess.JPG_thumb

                      1 Reply Last reply Reply Quote 0
                      • D
                        doktornotor Banned
                        last edited by

                        Dude. FTP is NOT SSH. Sigh. WTF.

                        (001914)5/7/2015 15:47:34 PM - (not logged in) (71.232.46.105)> SSH-2.0-libssh2_1.4.1
                        (001915)5/7/2015 15:54:15 PM - (not logged in) (157.7.237.232)> Connected on port 22, sending welcome message…

                        1 Reply Last reply Reply Quote 0
                        • KOMK
                          KOM
                          last edited by

                          WAN net is the entire subnet your WAN interface is part of.  WAN address is just the IP address used by your WAN.

                          My personal view is that you should ignore this guy or you will be playing whack-a-mole with him and other bots forever.  Let them knock on your door.  Just ignore them.  However, the challenge in this situation is how is he getting in in the first place?  We still haven't seen anything that shows the link between pfSense and your FTP server, no FTP rule, no port-forward.  Are you using an IP alias or is your FTP server listening on your WAN IP address?

                          Dude. FTP is NOT SSH. Sigh. WTF.

                          Regardless, how is this IP getting past the firewall?

                          1 Reply Last reply Reply Quote 0
                          • D
                            doktornotor Banned
                            last edited by

                            @KOM:

                            Dude. FTP is NOT SSH. Sigh. WTF.

                            Regardless, how is this IP getting past the firewall?

                            How? Because the "remotemanagement" allow rule is before "badguys" block. Useless.

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

                              @doktornotor:

                              Dude. FTP is NOT SSH. Sigh. WTF.

                              Of course not.  He's connected to my FTP server already when he's entering the SSH command.  He should have never been able to connect to my FTP server if his IP was blocked.  He should have never been able to get to the FTP prompt to attempt to enter the SSH command.

                              1 Reply Last reply Reply Quote 0
                              • D
                                doktornotor Banned
                                last edited by

                                Kindly go Google the difference between SSH and FTP. You don't have any FTP server there. libssh is not FTP and port 22 is not FTP either. Also your rules ordering is wrong, as noted above.

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

                                  @doktornotor:

                                  @KOM:

                                  Dude. FTP is NOT SSH. Sigh. WTF.

                                  Regardless, how is this IP getting past the firewall?

                                  How? Because the "remotemanagement" allow rule is before "badguys" block. Useless.

                                  I don't understand. Remotemanagement only lists two fixed IPs for granting access.  He isn't from either of those IPs.  How is that making it useless?

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    doktornotor Banned
                                    last edited by

                                    @cdsJerry:

                                    I don't understand. Remotemanagement only lists two fixed IPs for granting access.

                                    Apparently not. Also, those pfBlocker rules are just whacky. I really don't think you have a clue what you are doing.

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

                                      OK, I've attached more rules. You will see the bottom on is FTP but by being on the bottom, only access that hasn't already been blocked should get down the rule set this far.  And yes, there is an FTP server, and yes, I know the difference, and yes, he's attempting to enter SSH commands on and FTP connection, and no, he shouldn't have gotten that far to do so and that's what I'm trying to figure out. How did he get to the bottom of the rule list if there's a specific block for his IP at the top of the list (right below Remotemanagement which only passes two IPs).

                                      rules2.JPG
                                      rules2.JPG_thumb

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

                                        @doktornotor:

                                        @cdsJerry:

                                        I don't understand. Remotemanagement only lists two fixed IPs for granting access.

                                        Apparently not. Also, those pfBlocker rules are just whacky. I really don't think you have a clue what you are doing.

                                        The pfBlocker rules are created by pfBlocker, not me.  None of them are giving a pass to this guy's IPs. They're all blocks.

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          doktornotor Banned
                                          last edited by

                                          Let me repeat the port 22 is NOT FTP and libssh does NOT support FTP at all. What server are those logs from?

                                          @cdsJerry:

                                          The pfBlocker rules are created by pfBlocker, not me.  None of them are giving a pass to this guy's IPs. They're all blocks.

                                          Yeah. Based on your whacky misconfiguration that's apparently trying to block the entire world.

                                          @cdsJerry:

                                          OK, I've attached more rules.

                                          Yeah. Looking at that censored mess… humble suggestion: go ditch that frenzy and restart from scratch. Or perhaps better hire someone for the job.

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

                                            Port 22 is indeed routed to the FTP server and the FTP server is listening on that port as well as others.  FTPFileZilla is the FTP server running.

                                            And while you call this a "whacky misconfiguration", I'll point out again that support from pfSense has reviewed the configuration. Chris himself set up parts of it.

                                            And yes, blocking most of the world would be just fine with me because our business isn't a world-wide business.

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