Discussion:
[pfSense] FTP trouble.
J. Echter
2016-02-11 19:25:24 UTC
Permalink
Hi,

i have a tool which uodates its data by ftp. Nothing sepcial...

But, i cant use it as i get errors like 'no data', error 227 'entering
passive mode' and so on.

As far as i know should passive mode be working without any afford.

Where can i have a look what is going wrong?

I read about FTP helper and FTP CLient Proxy, but imho FTP Helper isn't
in 2.2 anymore and was more for ftp servers behind pfsense.


Please, any hints are welcome :)

Thanks.

Juergen
Kevin Tollison
2016-02-11 19:42:24 UTC
Permalink
I ran into this issue with a couple of sites using ftp on an as400. Even
opened a ticket with pfSense support. Was never able to resolve it. Sites
are unfortunately still running 2.1.5. Anything in the 2.2 series and ftp
fails immediately.

as400 vendor is working on a sftp or ftps update and has been for 9 months.
I gave up on trying to pass that traffic on pfSense 2.2

Support kept sending me back to this document.
https://doc.pfsense.org/index.php/FTP_without_a_Proxy
Post by J. Echter
Hi,
i have a tool which uodates its data by ftp. Nothing sepcial...
But, i cant use it as i get errors like 'no data', error 227 'entering
passive mode' and so on.
As far as i know should passive mode be working without any afford.
Where can i have a look what is going wrong?
I read about FTP helper and FTP CLient Proxy, but imho FTP Helper isn't
in 2.2 anymore and was more for ftp servers behind pfsense.
Please, any hints are welcome :)
Thanks.
Juergen
_______________________________________________
pfSense mailing list
https://lists.pfsense.org/mailman/listinfo/list
Support the project with Gold! https://pfsense.org/gold
Steve Yates
2016-02-11 19:55:27 UTC
Permalink
Post by J. Echter
But, i cant use it as i get errors like 'no data', error 227 'entering
passive mode' and so on.
So the FTP client is in your location and the FTP server is somewhere on the Internet? We've not had any issues with that under pfSense 2.x, and specifically 2.2.x for Kevin. I looked at the link he posted and I'm guessing you are hitting this:

"Passive mode on the client will require access to random/high ports outbound, which could run afoul of a strict outbound ruleset. Environments with a security policy that requires strict outbound firewall rules likely would not be using FTP anyhow, as it transmits credentials without encryption."

In other words if you are allowing port 21 outbound but blocking outbound ports over 1000, that would allow the initial connection and then fail on the data connection(s). The FTP server would tell the client what port to use for the data connection but then the client is blocked by the firewall. Try (in Status: System logs: Settings) setting your firewall log to "Log packets matched from the default block rules put in the ruleset" and see if that shows the block in your firewall log. And just to over clarify, it is the FTP server that tells the client what port to use, so you can't control that unless you control the FTP server.


--

Steve Yates
ITS, Inc.
ED Fochler
2016-02-11 20:22:02 UTC
Permalink
There is also extended passive, which is much better than old standard passive as it is ipv6 friendly and less likely to get wrongly proxied. So different clients from the same network to the same server may negotiate differently and present different results.

The next step would be to grab traffic and figure out where the data is trying to go. Or use sftp, as that is a single stream secure solution.

ED.
Post by Steve Yates
Post by J. Echter
But, i cant use it as i get errors like 'no data', error 227 'entering
passive mode' and so on.
"Passive mode on the client will require access to random/high ports outbound, which could run afoul of a strict outbound ruleset. Environments with a security policy that requires strict outbound firewall rules likely would not be using FTP anyhow, as it transmits credentials without encryption."
In other words if you are allowing port 21 outbound but blocking outbound ports over 1000, that would allow the initial connection and then fail on the data connection(s). The FTP server would tell the client what port to use for the data connection but then the client is blocked by the firewall. Try (in Status: System logs: Settings) setting your firewall log to "Log packets matched from the default block rules put in the ruleset" and see if that shows the block in your firewall log. And just to over clarify, it is the FTP server that tells the client what port to use, so you can't control that unless you control the FTP server.
--
Steve Yates
ITS, Inc.
_______________________________________________
pfSense mailing list
https://lists.pfsense.org/mailman/listinfo/list
Support the project with Gold! https://pfsense.org/gold
WebDawg
2016-02-11 20:09:43 UTC
Permalink
On Thu, Feb 11, 2016 at 1:25 PM, J. Echter
Post by J. Echter
Hi,
i have a tool which uodates its data by ftp. Nothing sepcial...
But, i cant use it as i get errors like 'no data', error 227 'entering
passive mode' and so on.
As far as i know should passive mode be working without any afford.
Where can i have a look what is going wrong?
I read about FTP helper and FTP CLient Proxy, but imho FTP Helper isn't
in 2.2 anymore and was more for ftp servers behind pfsense.
Please, any hints are welcome :)
Thanks.
Juergen
PASV mode requires you opening ports on the firewall so when a client
needs to transfer data it can use these ports to connect to the FTP
server and start the transfer. It is specifically built like this so
you CAN host a ftp server across NAT.

You usually have to configure the FTP server to utilize a range of
ports for its PASV mode based on the amount of active clients at one
time on a server. You then forward those ports to the internal
address of the box with the FTP server on it.

You may also have to configure a PASV ip address in the FTP server
because by default the ftp server will pass the ip it is on and the
port to the client telling it to connect there.

So if you do not do both, you are going to have issues connecting to a
FTP server behind a NATed box.

You should not be using just plain FTP anymore as it is insecure. You
should be using SFTP (ssh) or FTP with TLS enabled. You still have to
configure a group of PASV ports and a PASV ip in this instance.
J. Echter
2016-02-12 18:24:29 UTC
Permalink
Hi,

dont laugh. it was the f..... antivirus....

thanks for your inrerest :)
Post by J. Echter
Hi,
i have a tool which uodates its data by ftp. Nothing sepcial...
But, i cant use it as i get errors like 'no data', error 227 'entering
passive mode' and so on.
As far as i know should passive mode be working without any afford.
Where can i have a look what is going wrong?
I read about FTP helper and FTP CLient Proxy, but imho FTP Helper isn't
in 2.2 anymore and was more for ftp servers behind pfsense.
Please, any hints are welcome :)
Thanks.
Juergen
_______________________________________________
pfSense mailing list
https://lists.pfsense.org/mailman/listinfo/list
Support the project with Gold! https://pfsense.org/gold
WebDawg
2016-02-13 16:22:29 UTC
Permalink
On Fri, Feb 12, 2016 at 11:24 AM, J. Echter
Post by J. Echter
Hi,
dont laugh. it was the f..... antivirus....
thanks for your inrerest :)
AV on the server system?
J. Echter
2016-02-13 21:28:13 UTC
Permalink
Post by WebDawg
On Fri, Feb 12, 2016 at 11:24 AM, J. Echter
Post by J. Echter
Hi,
dont laugh. it was the f..... antivirus....
thanks for your inrerest :)
AV on the server system?
_______________________________________________
pfSense mailing list
https://lists.pfsense.org/mailman/listinfo/list
Support the project with Gold! https://pfsense.org/gold
Hi,

no on the client.

Loading...