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

    NAT/FTP Issues

    Scheduled Pinned Locked Moved NAT
    13 Posts 2 Posters 1.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.
    • S
      STV
      last edited by

      Hello All,

      Recently I have been trying to get access to an FTP server on the inside of my pfsense box across the internet. Have set up port forwarding on the routers and have been able to access/use the FTP server when it is placed outside of the pfsense box, but when it is on the inside it can connect but is unable to retrieve the directory list.

      Have tested this with a simple configuration on a fresh install of pfsense with only NAT to the ftp server and no other changes outside of the default settings and it worked fine.

      Can anyone give any suggestions on what might be causing my issues. Thanks in advance.

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

        Can anyone give any suggestions on what might be causing my issues.

        Not without a lot more detail.  NAT screen?  WAN rules screen?  How is your FTP server configured?  Active/passive?  Are you forwarding your passive port range?

        1 Reply Last reply Reply Quote 0
        • S
          STV
          last edited by

          I have attached screenshots of the NAT page, NAT rule and the firewall rules for that WAN interface.

          The FTP server is set up as passive and the passive port range is being forwarded through the pfsense box.

          firewall-rules.jpg
          firewall-rules.jpg_thumb
          ![NAT Shot.JPG](/public/imported_attachments/1/NAT Shot.JPG)
          ![NAT Shot.JPG_thumb](/public/imported_attachments/1/NAT Shot.JPG_thumb)
          ![Port Forwarding.JPG](/public/imported_attachments/1/Port Forwarding.JPG)
          ![Port Forwarding.JPG_thumb](/public/imported_attachments/1/Port Forwarding.JPG_thumb)

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

            Hmm, it looks good from here.  Where are you testing from?  Are you testing from LAN?  I notice you have NAT Reflection enabled which leads me to believe you're testing internally.  This will only lead to headaches.

            1 Reply Last reply Reply Quote 0
            • S
              STV
              last edited by

              Testing from outside of the LAN using a laptop with internet connection and Filezila FTP Client.

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

                Anything of note in either a) your System log or b) your FTP server log?

                1 Reply Last reply Reply Quote 0
                • S
                  STV
                  last edited by

                  The FTP Log i get from the client shows:

                  Response: 331 Please specify the password.
                  Command: PASS ********
                  Response: 230 Login successful.
                  Command: OPTS UTF8 ON
                  Response: 200 Always in UTF8 mode.
                  Status: Connected
                  Status: Retrieving directory listing…
                  Command: PWD
                  Response: 257 "/home/pi"
                  Command: TYPE I
                  Response: 200 Switching to Binary mode.
                  Command: PASV
                  Response: 227 Entering Passive Mode (92,27,78,166,224,132)
                  Command: LIST
                  Error: Connection timed out
                  Error: Failed to retrieve directory listing

                  I cannot see anything obviously wrong on the System logs, but I might not be looking in the right place. Any suggestions where to look specifically?

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

                    Sorry, brainfart.  I meant your firewall log.  Look for any traffic being blocked to or from your FTP server.

                    1 Reply Last reply Reply Quote 0
                    • S
                      STV
                      last edited by

                      Cant see anything in the firewall log that jumps out at me either.

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

                        I had just upgraded from 2.1.5 to 2.2.2 this past Friday.  I just now tested my FTP site (we don't rely on it much at all so I didn't check it when doing my post-upgrade sanity check).  My FTP site no longer works.  FTP client (WinSCP) says that the transfer channel can't be opened.  Looks like I'm in the same boat as you now for having upgraded.

                        1 Reply Last reply Reply Quote 0
                        • S
                          STV
                          last edited by

                          I have gone back to basics on this and installed a fresh copy of pfsense with all the default settings and none of the extra rules to see if I can find where the problem might be.

                          I installed a version 2.1.5 then upgraded to 2.2.2, set up the NAT rule the same as seen in my previous post pointing at the same FTP server and it worked perfectly. I then added the second WAN interface to the pfsense box and again it worked fine but when I added the third I got the same problem described previously with the directory listings not being returned.

                          anyone have any ideas?

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

                            The fix for me was that I was using translating the passive port range to a range that overlapped the FTP control and data ports (stupid).  Once I fixed that it worked again.

                            1 Reply Last reply Reply Quote 0
                            • S
                              STV
                              last edited by

                              Slight update on my end, made a mistake when checking the version it seems it didn't work on 2.2.2 for me. Rolled back to 2.1.5 and it is working fine for me now on both configuration.

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