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

    FTP passive port on demand opening

    Scheduled Pinned Locked Moved Firewalling
    32 Posts 4 Posters 2.9k 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.
    • JeGrJ
      JeGr LAYER 8 Moderator
      last edited by JeGr

      What indeed means, that it has nothing at all to do with running another protocol but is due to your local storage encryption thingy. So again, don't understand why you keep on mentioning that 150GB files would be harder/more CPU bound to transfer with any other possible (current, modern) transportation method. SFTP, HTTPS, etc. wouldn't need any more CPU cycles for 150G or 5G. If SFTP is slow I'd check with your target. Never seen that much difference on our customer hosting servers at all. More often it's a thing with the customers not updating their client software and using old/deprecated SSH/SSL ciphers/settings. I'd try updating clients etc. to ensure best protocols are used with hardware encryption in use etc. Had that discussions too many times like "But that tool worked for years!" - "Are there updates?" - updated tool multiple major versions "Wow it really is faster/is working now!" ;)

      But again, to stay in the OP: No passive port opening automagically as passive ports are configured on the server side and every server can declare them as they want. pfSense has an active FTP helper for outbound connections that could help with that but it relies on the other side offering active FTP - not everyone does that (or uses FTP at all these days).

      @openaspace said in FTP passive port on demand opening:

      i want to create a PASS firewall rule when a client compile a protected form where will write her static ip , in order to allow access only to him.

      Why? Passive FTP means you have inbound (if you host the server) or outbound connections with 21/tcp as well as xxxxx-yyyyy/tcp. So if it's your own FTP server where you upload your huge file stuff, why not allow your passive port range to your specific IP? Don't get the problem with opening passive ports here?

      Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

      If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

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

        As I already answered in my first post, there is no passive helper or way for pfsense to auto open the passive ports. If you want to provide passive ftp as an option to your ftp server then you need to set your ftp server to use a specific range of ports for its passive connections. And then forward that range.

        You can for sure lock down the source IPs on this forward/firewall 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

        1 Reply Last reply Reply Quote 0
        • O
          openaspace
          last edited by

          Yes, I will see if is possible to interact with pfsense using api to do this

          1 Reply Last reply Reply Quote 0
          • O
            openaspace @JeGr
            last edited by

            @JeGr it's well known that an sftp process use more cpu

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

              Your more than welcome to tinker all you want - but would be akin to coming up with a faster way to read floppy disks.. Nobody uses them ;)

              Sure there is a huge user base for something like this - the 3 people still using ftp will love you I am sure ;)

              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

              O 1 Reply Last reply Reply Quote 0
              • O
                openaspace @johnpoz
                last edited by

                @johnpoz said in FTP passive port on demand opening:

                Nobody uses them ;)

                that's where you're wrong ;) ๐Ÿ˜‚

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

                  Yeah there are still people using horses to pull their carts as well.. Not my point!

                  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

                  O 1 Reply Last reply Reply Quote 0
                  • O
                    openaspace @johnpoz
                    last edited by openaspace

                    @johnpoz said in FTP passive port on demand opening:

                    Yeah there are still people using horses to pull their carts as well.. Not my point!

                    in the economic crisis language, it's called "happy decrease"! ๐Ÿ˜‚

                    1 Reply Last reply Reply Quote 0
                    • JeGrJ
                      JeGr LAYER 8 Moderator @openaspace
                      last edited by JeGr

                      @openaspace said in FTP passive port on demand opening:

                      @JeGr it's well known that an sftp process use more cpu

                      Just to add 0.02$: Again depending on the cipher and setup used. And it's documented, that it strongly depends on you configuration of SSH. Also speed comparisons are available that show that modern versions of SSH that are patched for the old problems of high latency or window sizes aren't far behind in transfer speed. So modern ciphers like AES-CTR deal with single/multi-core problems and you can hit a 1gpbs bandwith limit if you do a little bit of homework and don't use ice-age-old versions of your toolchain ;)

                      Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

                      If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                      1 Reply Last reply Reply Quote 0
                      • O
                        openaspace
                        last edited by

                        Only 10 sftp connections for a total 60MB/s โ˜ 

                        Schermata 2019-11-12 alle 13 07 30 (1).png

                        1 Reply Last reply Reply Quote 0
                        • O
                          openaspace
                          last edited by

                          10 webdav connections over https at 90MB/s ;)

                          webdav-Schermata 2019-11-12 alle 13 13 42.png

                          1 Reply Last reply Reply Quote 0
                          • JeGrJ
                            JeGr LAYER 8 Moderator
                            last edited by

                            Besides your question solved - what about actually reading what I wrote? You show some graphs with no intel whatsoever. As I said, if you set it up right, it CAN work the same without pulling your leg. How should I know what old software you're running? I can show you graphs all day long - without details they tell you nothing other that you seem to be having a bad SSH setup. shrug But hey, if one wants to see problems as nails to use their hammer, that's nice. Have fun hammering :)

                            Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

                            If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

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

                              What cipher is being used for these connections... There can be some huge difference in speed and cpu cost.. And if the box supports say aes-ni, etc..

                              Simple test here locally.. using just chacha20 vs aes256-ctr and go from like 75MBps, to full gig at 111 and pretty good drop in cpu usage as well. Now I am a fan of chacha.. But if what your looking for is fastest speed with lowest resources used... Then yes you have to take a few minutes to config your stuff and not just turn it on.. This goes for everything in the IT world.

                              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

                              O 1 Reply Last reply Reply Quote 0
                              • O
                                openaspace @johnpoz
                                last edited by

                                @johnpoz I denote a certain polemical vein ๐Ÿ˜‚

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