I have enabled ports 20 and 21 in csf.conf for TCP IN and OUT and UDP IN and OUT.
BUT using my FTP client just fails. If I turn off CSF it connects fine.
So its got to be a CSF issue but the ports are open.
Some help online states using passive and setting PassivePorts in proftpd.conf but that does not work either, and dont see why I need to use passive, it wont work with or without passive.
Looks like its getting in but not get return response.
Be sure you have and ESTABLISHED/RELATED line in the firewall. CSF includes it normally but could have been turned off by mistake.
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
If that doesn’t do it, check /etc/proftpd.conf for the passive ports it’s using and open those on the ‘out’ or possibly ‘in and out’. Try the minimum first.
Yeah, got this:
ACCEPT all opt – in !lo out * 0.0.0.0/0 -> 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT all opt – in * out !lo 0.0.0.0/0 -> 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT all opt in !lo out * ::/0 -> ::/0 state RELATED,ESTABLISHED
ACCEPT all opt in * out !lo ::/0 -> ::/0 state RELATED,ESTABLISHED
There is no passive ports in proftpd.conf, but if I add them in as per other threads (e.g. PassivePorts 30000 35000) and open those in CSF, it still does not work. Whether I set my client to use passive or not.
Maybe there is some other strange issue going on… I added the IP I cant connect from to the allow list in csf but still could not connect. But if I disable CSF it works.
So must be a CSF thing, but its ignoring the allow IP also. So some other block for FTP going on?
I have opened ports 20 and 21 in csf for TCP IN and OUT and UDP IN and OUT
I also tried adding passive ports.
It works when CSF is disabled so no other firewall blocking it.
@scotwnw just a public IP I think. I am connecting through my mobile phone wifi hotspot (because my main network is in the allowed list, which I have to have or I wont be able to access the server). but was notified of this issue by a customer who cant connect either.